Skip to content

Commit 5ee44f6

Browse files
a-mrdom96
authored andcommitted
Use quotation support from rst.nim
1 parent 40d7b1c commit 5ee44f6

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/utils.nim

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,10 @@ proc rstToHtml*(content: string): string =
178178
docConfig)
179179
try:
180180
var node = parseHtml(newStringStream(result))
181-
if node.kind == xnElement:
182-
node = processQuotes(node)
181+
# rst.nim parser did not support quotes until Nim 1.7:
182+
when (NimMajor, NimMinor) < (1, 7):
183+
if node.kind == xnElement:
184+
node = processQuotes(node)
183185
node = processMentions(node)
184186
result = ""
185187
add(result, node, indWidth=0, addNewLines=false)

0 commit comments

Comments
 (0)