Skip to content

Commit

Permalink
Add hyperlinks to builtin types
Browse files Browse the repository at this point in the history
  • Loading branch information
gingerBill committed Jul 9, 2023
1 parent 8151635 commit d26b890
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main.odin
Original file line number Diff line number Diff line change
Expand Up @@ -696,7 +696,7 @@ write_type :: proc(using writer: ^Type_Writer, type: doc.Type, flags: Write_Type
if is_type_untyped(type) {
io.write_string(w, str(type.name))
} else {
fmt.wprintf(w, `<span class="doc-builtin">%s</span>`, str(type.name))
fmt.wprintf(w, `<a href="/core/builtin#{0:s}"><span class="doc-builtin">{0:s}</span></a>`, str(type.name))
// io.write_string(w, str(type.name))
}
case .Named:
Expand Down Expand Up @@ -1946,7 +1946,7 @@ write_related_procedures :: proc(w: io.Writer, pkg: ^doc.Pkg, parent: ^doc.Entit
fmt.wprintf(w, `<a href="%s/%s/#%s">%s</a>`, pkg_to_collection[pkg].base_url, pkg_to_path[pkg], proc_name, proc_name)

if e.kind == .Proc_Group {
fmt.wprintf(w, `&nbsp;<em>(overloaded procedure group)</em>`)
fmt.wprintf(w, `&nbsp;<em>(procedure groups)</em>`)
}

fmt.wprintf(w, "</li>")
Expand Down

0 comments on commit d26b890

Please sign in to comment.