From 8342d04b0e9f78ac313edb8d647bc10f600b70a1 Mon Sep 17 00:00:00 2001 From: Alejandro Mery Date: Tue, 11 Dec 2007 15:28:58 -0300 Subject: [PATCH] Fixed undefined variable in asciidoc, patch accepted upstream --- textproc/asciidoc/hotfix-undefined_b.patch | 54 ++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 textproc/asciidoc/hotfix-undefined_b.patch diff --git a/textproc/asciidoc/hotfix-undefined_b.patch b/textproc/asciidoc/hotfix-undefined_b.patch new file mode 100644 index 000000000..c8018ec8e --- /dev/null +++ b/textproc/asciidoc/hotfix-undefined_b.patch @@ -0,0 +1,54 @@ +# --- SDE-COPYRIGHT-NOTE-BEGIN --- +# This copyright note is auto-generated by ./scripts/Create-CopyPatch. +# +# Filename: package/.../asciidoc/hotfix-undefined_b.patch +# Copyright (C) 2007 The OpenSDE Project +# +# More information can be found in the files COPYING and README. +# +# This patch file is dual-licensed. It is available under the license the +# patched project is licensed under, as long as it is an OpenSource license +# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms +# of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# --- SDE-COPYRIGHT-NOTE-END --- + +Taken from http://hg.sharesource.org/asciidoc/raw-rev/8b6d11203ed3 + +# HG changeset patch +# User Stuart Rackham +# Date 1197344594 -46800 +# Node ID 8b6d11203ed3729ed597fc7ca876bde205d271a1 +# Parent 386e75a49a1ae3437581fae97a5d5c27c82ba5fb +b variable used before assignment + +An error is generated using the asciidoc -e option when +there are no block definitions. + +Patch submitted by Alejandro Mery + +--- a/asciidoc.py Tue Dec 11 11:10:45 2007 +1300 ++++ b/asciidoc.py Tue Dec 11 16:43:14 2007 +1300 +@@ -2061,16 +2061,13 @@ class AbstractBlocks: + def validate(self): + '''Validate the block definitions.''' + # Validate delimiters and build combined lists delimiter pattern. ++ delimiters = [] + for b in self.blocks: + assert b.__class__ is self.BLOCK_TYPE + b.validate() +- if b.is_conf_entry('delimiter'): +- delimiters = [] +- for b in self.blocks: +- b.validate() +- if b.delimiter: +- delimiters.append(b.delimiter) +- self.delimiter = join_regexp(delimiters) ++ if b.delimiter: ++ delimiters.append(b.delimiter) ++ self.delimiter = join_regexp(delimiters) + + class Paragraph(AbstractBlock): + def __init__(self): +