diff options
-rw-r--r-- | lib/packages/docutils/rst.nim | 2 | ||||
-rw-r--r-- | tests/stdlib/trstgen.nim | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/lib/packages/docutils/rst.nim b/lib/packages/docutils/rst.nim index 66efa3a3c..dfa2f12be 100644 --- a/lib/packages/docutils/rst.nim +++ b/lib/packages/docutils/rst.nim @@ -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 = diff --git a/tests/stdlib/trstgen.nim b/tests/stdlib/trstgen.nim index ad0c27f05..57dacdf11 100644 --- a/tests/stdlib/trstgen.nim +++ b/tests/stdlib/trstgen.nim @@ -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>." |