mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
vdoc: prefix for head section id (#7866)
This commit is contained in:
parent
0ab6a8cd01
commit
4f5db46bc2
@ -403,7 +403,7 @@ fn doc_node_html(dd doc.DocNode, link string, head bool, tb &table.Table) string
|
|||||||
hlighted_code := html_highlight(dd.content, tb)
|
hlighted_code := html_highlight(dd.content, tb)
|
||||||
node_class := if dd.kind == .const_group { ' const' } else { '' }
|
node_class := if dd.kind == .const_group { ' const' } else { '' }
|
||||||
sym_name := get_sym_name(dd)
|
sym_name := get_sym_name(dd)
|
||||||
node_id := get_node_id(dd)
|
node_id := if head { 'head_' + get_node_id(dd) } else { get_node_id(dd) }
|
||||||
hash_link := if !head { ' <a href="#$node_id">#</a>' } else { '' }
|
hash_link := if !head { ' <a href="#$node_id">#</a>' } else { '' }
|
||||||
dnw.writeln('${tabs[1]}<section id="$node_id" class="doc-node$node_class">')
|
dnw.writeln('${tabs[1]}<section id="$node_id" class="doc-node$node_class">')
|
||||||
if dd.name.len > 0 {
|
if dd.name.len > 0 {
|
||||||
|
Loading…
Reference in New Issue
Block a user