This commit is contained in:
root
2026-06-15 21:42:50 +00:00
parent 34a97e2577
commit 99cd92fb4a
126 changed files with 1615 additions and 1057 deletions
+19
View File
@@ -13,12 +13,25 @@ enum class DocPageKind
function,
struct_page,
directive,
method,
info
};
String doc_method_label(String page)
{
String label = page;
nibble(label, "_");
String class_name = nibble(label, "_");
if(label == "")
return(class_name);
return(class_name + "::" + label);
}
String doc_default_title(String page)
{
String page_title = page;
if(page.substr(0, 2) == "2_")
return(doc_method_label(page));
if(page_title.length() > 1 && page_title[1] == '_')
nibble(page_title, "_");
return(page_title);
@@ -60,6 +73,8 @@ DocPageKind doc_page_kind(String page)
return(DocPageKind::struct_page);
if(page.substr(0, 2) == "1_")
return(DocPageKind::directive);
if(page.substr(0, 2) == "2_")
return(DocPageKind::method);
if(page.substr(0, 2) == "3_")
return(DocPageKind::info);
return(DocPageKind::function);
@@ -71,6 +86,8 @@ String doc_page_kind_badge(DocPageKind kind)
return("struct");
if(kind == DocPageKind::directive)
return("directive");
if(kind == DocPageKind::method)
return("method");
if(kind == DocPageKind::info)
return("info");
return("");
@@ -80,6 +97,8 @@ String doc_index_label(String page)
{
String label = page;
auto kind = doc_page_kind(page);
if(kind == DocPageKind::method)
return(doc_method_label(page));
if(kind == DocPageKind::struct_page || kind == DocPageKind::directive || kind == DocPageKind::info)
nibble(label, "_");
return(label);