aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2022-01-19 17:15:10 +0000
committergingerBill <bill@gingerbill.org>2022-01-19 17:15:10 +0000
commit2b918ada4bd640f9b0057f2ae4213fb73cae6ac5 (patch)
tree72e94661ae302821b2f0867dddb7cfb81c248bae /tools
parentb5754b6ed9082bb729ea5d18a926c723e52f377f (diff)
Add `.Private` information to doc-format
Diffstat (limited to 'tools')
-rw-r--r--tools/odin-html-docs/odin_html_docs_main.odin5
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/odin-html-docs/odin_html_docs_main.odin b/tools/odin-html-docs/odin_html_docs_main.odin
index 89a82ad77..570950dfb 100644
--- a/tools/odin-html-docs/odin_html_docs_main.odin
+++ b/tools/odin-html-docs/odin_html_docs_main.odin
@@ -543,10 +543,13 @@ write_type :: proc(using writer: ^Type_Writer, type: doc.Type, flags: Write_Type
e := entities[type_entites[0]]
name := str(type.name)
tn_pkg := files[e.pos.file].pkg
+
if tn_pkg != pkg {
fmt.wprintf(w, `%s.`, str(pkgs[tn_pkg].name))
}
- if n := strings.contains_rune(name, '('); n >= 0 {
+ if .Private in e.flags {
+ io.write_string(w, name)
+ } else if n := strings.contains_rune(name, '('); n >= 0 {
fmt.wprintf(w, `<a class="code-typename" href="{2:s}/{0:s}/#{1:s}">{1:s}</a>`, pkg_to_path[&pkgs[tn_pkg]], name[:n], BASE_CORE_URL)
io.write_string(w, name[n:])
} else {