symbol_page

func symbol_page(module_page: &String, signature: String) -> String

Returns the standalone page for a top-level declaration.

The declaration anchor remains part of the URL so old in-page anchor semantics continue to identify the exact symbol after declarations move off module pages.

View Source
pub func symbol_page(module_page: &String, signature: String) -> String {
	if module_page.byte_count == 0 { return "" }
	let stem = if module_page.ends_with(needle: ".html") {
		module_page.utf8().slice(start: 0, byte_count: module_page.byte_count - 5).to_string()
	} else {
		module_page.to_string()
	}
	stem + ".symbol-" + anchor_for(signature: signature) + ".html"
}