diff options
author | Andrey Makarov <ph.makarov@gmail.com> | 2023-04-11 07:40:20 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-11 06:40:20 +0200 |
commit | 420b0c14eb0b82e05873191b277e889f95bc802b (patch) | |
tree | b7b44efd06deeefc61c1825aa7712831e7027e74 /lib | |
parent | 4c073cffbe39ad85eb2efa2521c2ad3a97ba8268 (diff) | |
download | Nim-420b0c14eb0b82e05873191b277e889f95bc802b.tar.gz |
Fix option lists with additional indentation in Markdown (#21633)
This is more Markdown-ish way to fix issue #21055, then PR #21625. It does not enable RST definition lists, instead it makes adding additional indentation (less than 4) right after a paragraph be ignored, as it's done for all block elements in Markdown. (In this case this tenet is applied to option lists that are not part of CommonMark spec by themselves).
Diffstat (limited to 'lib')
-rw-r--r-- | lib/packages/docutils/rst.nim | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/packages/docutils/rst.nim b/lib/packages/docutils/rst.nim index 6d05a2454..4bb623d20 100644 --- a/lib/packages/docutils/rst.nim +++ b/lib/packages/docutils/rst.nim @@ -2447,7 +2447,9 @@ proc parseParagraph(p: var RstParser, result: PRstNode) = result.addIfNotNil(parseLineBlock(p)) of rnMarkdownBlockQuote: result.addIfNotNil(parseMarkdownBlockQuote(p)) - else: break + else: + dec p.idx # allow subsequent block to be parsed as another section + break else: break of tkPunct: |