HammeriteManualPage
Editor. Inherits RefCounted
One page of the manual: its front matter, its headings and its markdown.
path is where the page sits in the manual's virtual tree, <section>/<page>.md, which is what links name; file is where it was read from.
Properties
| Type | Name | Default |
|---|---|---|
String | body | |
String | file | |
HammeriteManualPageHeading[] | headings | |
PackedStringArray | keywords | |
int | modified | |
int | order | |
String | path | |
String | plain_text | |
PackedStringArray | problems | |
String | title |
Methods
| Returns | Method |
|---|---|
String | anchor_for(heading_text: String) static |
PackedStringArray | anchors() |
bool | has_anchor(anchor: String) |
bool | is_table_rule(line: String) static |
HammeriteManualPage | load_file(page_path: String, page_file: String) static |
HammeriteManualPage | parse(source: String, page_path: String, page_file: String = "") static |
String | plain(markdown: String) static |
StringName | section_id() |
Property descriptions
body
var body: String
The markdown after the front matter.
file
var file: String
The file it was read from.
headings
var headings: HammeriteManualPageHeading[]
Its headings, in order.
keywords
var keywords: PackedStringArray
Its front matter's keywords, for search.
modified
var modified: int
The file's modification time when it was read, to notice an edit.
order
var order: int
Where it stands in its section, lowest first after the index page.
path
var path: String
Where the page sits in the manual, <section>/<page>.md: what links name.
plain_text
var plain_text: String
The body without markup, for search.
problems
var problems: PackedStringArray
What is wrong with the page's format, one line each.
title
var title: String
Its front matter's title.
Method descriptions
anchor_for()
static func anchor_for(heading_text: String) -> String
The anchor a heading is linked by: lowercase, spaces to hyphens, punctuation dropped. The same rule as GitHub's, so a link works on a website unchanged.
anchors()
func anchors() -> PackedStringArray
Undocumented.
has_anchor()
func has_anchor(anchor: String) -> bool
Undocumented.
is_table_rule()
static func is_table_rule(line: String) -> bool
Whether line is the row under a table's header, |---|:--|.
load_file()
static func load_file(page_path: String, page_file: String) -> HammeriteManualPage
Undocumented.
parse()
static func parse(source: String, page_path: String, page_file: String = "") -> HammeriteManualPage
Undocumented.
plain()
static func plain(markdown: String) -> String
Inline markdown as the words it shows.
section_id()
func section_id() -> StringName
Undocumented.