This commit is contained in:
Timothee Cour 2020-05-28 19:00:36 -07:00 • committed by GitHub
commit 579456d520
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 44 additions and 3 deletions

View file

@ -66,10 +66,9 @@ proc renderNimCode*(result: var string, code: string, isLatex = false) =
buf.addEscaped(val)
let class = tokenClassToStr[kind]
if isLatex:
result.addf "\\span$1{$2}" % [class, buf]
result.addf "\\span$1{$2}", [class, buf]
else:
result.addf "<span class=\"$1\">$2</span>" % [class, buf]
result.addf "<span class=\"$1\">$2</span>", [class, buf]
while true:
getNextToken(toknizr, langNim)
case toknizr.kind