fixes rst parsing Markdown CodeblockFields blocking the loop (#24128)

```nim
import packages/docutils/[rst, rstgen]

let message = """```llvm-profdata"""

echo rstgen.rstToHtml(message, {roSupportMarkdown}, nil)
```
This commit is contained in:
ringabout
2024-09-18 23:35:46 +08:00
committed by GitHub
parent 04ccd2f4f0
commit c759d7abd1
2 changed files with 13 additions and 1 deletions

View File

@@ -1526,7 +1526,7 @@ proc parseMarkdownCodeblockFields(p: var RstParser): PRstNode =
result = nil
else:
result = newRstNode(rnFieldList)
while currentTok(p).kind != tkIndent:
while currentTok(p).kind notin {tkIndent, tkEof}:
if currentTok(p).kind == tkWhite:
inc p.idx
else: