From e13174c9447440da3a21ce6174b6550884f7d38f Mon Sep 17 00:00:00 2001 From: Andrey Makarov Date: Thu, 11 Mar 2021 00:07:54 +0300 Subject: [PATCH] fix regression --- lib/packages/docutils/rst.nim | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/packages/docutils/rst.nim b/lib/packages/docutils/rst.nim index d2bfb39785fe2..ea0c079daa93d 100644 --- a/lib/packages/docutils/rst.nim +++ b/lib/packages/docutils/rst.nim @@ -1973,7 +1973,8 @@ proc parseEnumList(p: var RstParser): PRstNode = result = false else: result = true - if not checkAfterNewline(p, report = true): return nil + if not checkAfterNewline(p, report = true): + return nil result = newRstNodeA(p, rnEnumList) let autoEnums = if roSupportMarkdown in p.s.options: @["#", "1"] else: @["#"] var prevAE = "" # so as not allow mixing auto-enumerators `1` and `#` @@ -1996,7 +1997,8 @@ proc parseEnumList(p: var RstParser): PRstNode = match(p, p.idx+1, wildcards[w]): # don't report to avoid duplication of warning since for # subsequent enum. items parseEnumList will be called second time: - if not checkAfterNewline(p, report = false): return nil + if not checkAfterNewline(p, report = false): + break let enumerator = p.tok[p.idx + 1 + wildIndex[w]].symbol # check that it's in sequence: enumerator == next(prevEnum) if "n" in wildcards[w]: # arabic numeral