* docgen: add links for var, let and const (refs #10487) * change the expected html
This commit is contained in:
parent
1eefbf6da8
commit
54151ce398
2 changed files with 4 additions and 4 deletions
|
|
@ -344,9 +344,9 @@ proc nodeToHighlightedHtml(d: PDoc; n: PNode; result: var Rope; renderFlags: TRe
|
|||
if procTokenPos == tokenPos-2 and procLink != nil:
|
||||
dispA(d.conf, result, "<a href=\"#$2\"><span class=\"Identifier\">$1</span></a>",
|
||||
"\\spanIdentifier{$1}", [rope(esc(d.target, literal)), procLink])
|
||||
elif s != nil and s.kind == skType and sfExported in s.flags and
|
||||
s.owner != nil and belongsToPackage(d.conf, s.owner) and
|
||||
d.target == outHtml:
|
||||
elif s != nil and s.kind in {skType, skVar, skLet, skConst} and
|
||||
sfExported in s.flags and s.owner != nil and
|
||||
belongsToPackage(d.conf, s.owner) and d.target == outHtml:
|
||||
let external = externalDep(d, s.owner)
|
||||
result.addf "<a href=\"$1#$2\"><span class=\"Identifier\">$3</span></a>",
|
||||
[rope changeFileExt(external, "html"), rope literal,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue