fix nimindexterm in rst2tex/doc2tex [backport] (#19106)

* fix nimindexterm (rst2tex/doc2tex) [backport]

* Add support for indexing in rst
This commit is contained in:
Andrey Makarov
2021-11-09 21:01:47 +03:00
committed by GitHub
parent 46fb855425
commit 997ccc5889
3 changed files with 18 additions and 2 deletions

View File

@@ -408,7 +408,7 @@ proc renderIndexTerm*(d: PDoc, n: PRstNode, result: var string) =
var term = ""
renderAux(d, n, term)
setIndexTerm(d, changeFileExt(extractFilename(d.filename), HtmlExt), id, term, d.currentSection)
dispA(d.target, result, "<span id=\"$1\">$2</span>", "\\nimindexterm{$2}{$1}",
dispA(d.target, result, "<span id=\"$1\">$2</span>", "\\nimindexterm{$1}{$2}",
[id, term])
type