From: David G. <go...@us...> - 2003-09-20 17:22:15
|
Update of /cvsroot/docutils/docutils/docutils/parsers/rst In directory sc8-pr-cvs1:/tmp/cvs-serv11555/docutils/parsers/rst Modified Files: states.py Log Message: Fixed handling of backslashes in substitution definitions. Index: states.py =================================================================== RCS file: /cvsroot/docutils/docutils/docutils/parsers/rst/states.py,v retrieving revision 1.56 retrieving revision 1.57 diff -u -d -r1.56 -r1.57 --- states.py 19 Sep 2003 03:01:44 -0000 1.56 +++ states.py 20 Sep 2003 17:22:10 -0000 1.57 @@ -1936,9 +1936,7 @@ strip_indent=0) blocktext = (match.string[:match.end()] + '\n'.join(block)) block.disconnect() - for i in range(len(block)): - block[i] = escape2null(block[i]) - escaped = block[0].rstrip() + escaped = escape2null(block[0].rstrip()) blockindex = 0 while 1: subdefmatch = pattern.match(escaped) @@ -1946,7 +1944,7 @@ break blockindex += 1 try: - escaped = escaped + ' ' + block[blockindex].strip() + escaped = escaped + ' ' + escape2null(block[blockindex].strip()) except IndexError: raise MarkupError('malformed substitution definition.', lineno) |