restyle RST option lists (#17637)
* WIP: restyle RST option lists * apply similar style to Latex * fix tests * minor visual tweaks * update tests * remove leftover comments
This commit is contained in:
parent
08262206d3
commit
2150cd1826
7 changed files with 103 additions and 21 deletions
|
|
@ -90,7 +90,7 @@ type
|
|||
level*: int ## level of headings starting from 1 (main
|
||||
## chapter) to larger ones (minor sub-sections)
|
||||
## level=0 means it's document title or subtitle
|
||||
of rnFootnote, rnCitation, rnFootnoteRef:
|
||||
of rnFootnote, rnCitation, rnFootnoteRef, rnOptionListItem:
|
||||
order*: int ## footnote order (for auto-symbol footnotes and
|
||||
## auto-numbered ones without a label)
|
||||
else:
|
||||
|
|
@ -368,7 +368,7 @@ proc renderRstToStr*(node: PRstNode, indent=0): string =
|
|||
result.add txt
|
||||
of rnHeadline, rnOverline, rnMarkdownHeadline:
|
||||
result.add "\tlevel=" & $node.level
|
||||
of rnFootnote, rnCitation, rnFootnoteRef:
|
||||
of rnFootnote, rnCitation, rnFootnoteRef, rnOptionListItem:
|
||||
result.add (if node.order == 0: "" else: "\torder=" & $node.order)
|
||||
else:
|
||||
discard
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue