1
0
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:
Lukas Neubert 2021-01-04 19:00:18 +01:00 committed by GitHub
parent 0ab6a8cd01
commit 4f5db46bc2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)
node_class := if dd.kind == .const_group { ' const' } else { '' }
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 { '' }
dnw.writeln('${tabs[1]}<section id="$node_id" class="doc-node$node_class">')
if dd.name.len > 0 {