server output fix

This commit is contained in:
Felix Krause 2021-05-17 20:33:05 +02:00
parent 2b0e20abd0
commit a053947f53
1 changed files with 2 additions and 2 deletions

View File

@ -5,7 +5,7 @@
# distribution, for details about the copyright. # distribution, for details about the copyright.
import jester, asyncdispatch, json, streams, strutils import jester, asyncdispatch, json, streams, strutils
import packages.docutils.rstgen, packages.docutils.highlite, options import packages/docutils/rstgen, packages/docutils/highlite, options
import ../yaml import ../yaml
routes: routes:
@ -57,7 +57,7 @@ routes:
of gtNone, gtWhitespace: of gtNone, gtWhitespace:
highlighted.add(substr(output.data, g.start, g.length + g.start - 1)) highlighted.add(substr(output.data, g.start, g.length + g.start - 1))
else: else:
highlighted.addf("<span class=\"$2\">$1</span>", "\\span$2{$1}", highlighted.addf("<span class=\"$2\">$1</span>",
esc(outHtml, substr(output.data, g.start, g.length+g.start-1)), esc(outHtml, substr(output.data, g.start, g.length+g.start-1)),
tokenClassToStr[g.kind]) tokenClassToStr[g.kind])