docgen: working search feature
This commit is contained in:
parent
3a3aeb94ec
commit
3dfc866710
4 changed files with 26 additions and 19 deletions
|
|
@ -19,20 +19,14 @@ proc renderPlainSymbolName*(n: PNode): string =
|
|||
## for the HTML hyperlinks.
|
||||
result = ""
|
||||
case n.kind
|
||||
of nkPostfix:
|
||||
for i in 0 .. <n.len:
|
||||
result = renderPlainSymbolName(n[<n.len])
|
||||
if result.len > 0:
|
||||
return
|
||||
of nkPostfix, nkAccQuoted:
|
||||
result = renderPlainSymbolName(n[<n.len])
|
||||
of nkIdent:
|
||||
if n.ident.s != "*":
|
||||
result = n.ident.s
|
||||
result = n.ident.s
|
||||
of nkSym:
|
||||
result = n.sym.renderDefinitionName(noQuotes = true)
|
||||
of nkPragmaExpr:
|
||||
result = renderPlainSymbolName(n[0])
|
||||
of nkAccQuoted:
|
||||
result = renderPlainSymbolName(n[<n.len])
|
||||
else:
|
||||
internalError(n.info, "renderPlainSymbolName() with " & $n.kind)
|
||||
assert(not result.isNil)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue