OpenSDE Packages Database (without history before r20070)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

54 lines
2.0 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../asciidoc/hotfix-undefined_b.patch
  5. # Copyright (C) 2007 The OpenSDE Project
  6. #
  7. # More information can be found in the files COPYING and README.
  8. #
  9. # This patch file is dual-licensed. It is available under the license the
  10. # patched project is licensed under, as long as it is an OpenSource license
  11. # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
  12. # of the GNU General Public License as published by the Free Software
  13. # Foundation; either version 2 of the License, or (at your option) any later
  14. # version.
  15. # --- SDE-COPYRIGHT-NOTE-END ---
  16. Taken from http://hg.sharesource.org/asciidoc/raw-rev/8b6d11203ed3
  17. # HG changeset patch
  18. # User Stuart Rackham <srackham@methods.co.nz>
  19. # Date 1197344594 -46800
  20. # Node ID 8b6d11203ed3729ed597fc7ca876bde205d271a1
  21. # Parent 386e75a49a1ae3437581fae97a5d5c27c82ba5fb
  22. b variable used before assignment
  23. An error is generated using the asciidoc -e option when
  24. there are no block definitions.
  25. Patch submitted by Alejandro Mery
  26. --- a/asciidoc.py Tue Dec 11 11:10:45 2007 +1300
  27. +++ b/asciidoc.py Tue Dec 11 16:43:14 2007 +1300
  28. @@ -2061,16 +2061,13 @@ class AbstractBlocks:
  29. def validate(self):
  30. '''Validate the block definitions.'''
  31. # Validate delimiters and build combined lists delimiter pattern.
  32. + delimiters = []
  33. for b in self.blocks:
  34. assert b.__class__ is self.BLOCK_TYPE
  35. b.validate()
  36. - if b.is_conf_entry('delimiter'):
  37. - delimiters = []
  38. - for b in self.blocks:
  39. - b.validate()
  40. - if b.delimiter:
  41. - delimiters.append(b.delimiter)
  42. - self.delimiter = join_regexp(delimiters)
  43. + if b.delimiter:
  44. + delimiters.append(b.delimiter)
  45. + self.delimiter = join_regexp(delimiters)
  46. class Paragraph(AbstractBlock):
  47. def __init__(self):