1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

tools: support VDOC_SORT=false ./v doc time

This commit is contained in:
Delyan Angelov
2023-03-30 14:33:23 +03:00
parent b9352ce834
commit 214f72ba03
3 changed files with 18 additions and 4 deletions

View File

@@ -394,9 +394,13 @@ fn doc_node_html(dn doc.DocNode, link string, head bool, include_examples bool,
node_class := if dn.kind == .const_group { ' const' } else { '' }
sym_name := get_sym_name(dn)
mut deprecated_tags := dn.tags.filter(it.starts_with('deprecated'))
deprecated_tags.sort()
if doc.should_sort {
deprecated_tags.sort()
}
mut tags := dn.tags.filter(!it.starts_with('deprecated'))
tags.sort()
if doc.should_sort {
tags.sort()
}
mut node_id := get_node_id(dn)
mut hash_link := if !head { ' <a href="#${node_id}">#</a>' } else { '' }
if head && is_module_readme(dn) {