Skip to content

Commit

Permalink
fix regression
Browse files Browse the repository at this point in the history
  • Loading branch information
a-mr committed Mar 10, 2021
1 parent b0e20bc commit e13174c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/packages/docutils/rst.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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 `#`
Expand All @@ -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
Expand Down

0 comments on commit e13174c

Please sign in to comment.