fix rst option list at EOF (follow-up #17442) (#17638)

This commit is contained in:
Andrey Makarov
2021-04-04 21:54:26 +03:00
committed by GitHub
parent 97764c8dc9
commit f02e159b56
2 changed files with 3 additions and 1 deletions

View File

@@ -2067,7 +2067,7 @@ proc parseOptionList(p: var RstParser): PRstNode =
c.add(b)
result.add(c)
else:
dec p.idx # back to tkIndent
if currentTok(p).kind != tkEof: dec p.idx # back to tkIndent
break
proc parseDefinitionList(p: var RstParser): PRstNode =

View File

@@ -1362,6 +1362,7 @@ Test1
output)
check("""<th align="left">-d</th><td align="left">option</td>""" in
output)
check "<p>option</p>" notin output
test "Option list 3 (double /)":
let input = dedent """
@@ -1378,6 +1379,7 @@ Test1
output)
check("""<th align="left">-d</th><td align="left">option</td>""" in
output)
check "<p>option</p>" notin output
test "Roles: subscript prefix/postfix":
let expected = "See <sub>some text</sub>."