* RST: fix directive with fields (#16490) * Update tests/stdlib/trstgen.nim Co-authored-by: Clyybber <darkmine956@gmail.com>
This commit is contained in:
parent
6d442a40a6
commit
e70ac0f34c
2 changed files with 13 additions and 1 deletions
|
|
@ -1737,7 +1737,8 @@ proc parseDirective(p: var RstParser, flags: DirFlags,
|
|||
##
|
||||
## .. warning:: Any of the 3 children may be nil.
|
||||
result = parseDirective(p, flags)
|
||||
if not isNil(contentParser):
|
||||
if not isNil(contentParser) and
|
||||
(currentTok(p).kind != tkIndent or indFollows(p)):
|
||||
var nextIndent = p.tok[tokenAfterNewline(p)-1].ival
|
||||
if nextIndent <= currInd(p): # parse only this line
|
||||
nextIndent = currentTok(p).col
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue