Fixed issue with rst parser failing to parse a specific character.

This commit is contained in:
Dominik Picheta
2013-03-27 23:46:58 +00:00
parent 74404de12d
commit 1beaca29bb

View File

@@ -602,7 +602,8 @@ proc parsePostfix(p: var TRstParser, n: PRstNode): PRstNode =
proc matchVerbatim(p: TRstParser, start: int, expr: string): int =
result = start
var j = 0
while j < expr.len and continuesWith(expr, p.tok[result].symbol, j):
while j < expr.len and result < p.tok.len and
continuesWith(expr, p.tok[result].symbol, j):
inc j, p.tok[result].symbol.len
inc result
if j < expr.len: result = 0