- Attributes of ProcessedState object
- Attributes of RakuDoc::Processed
%.source-data
$!output-format = 'txt'
Str $.front-matter is rw = 'preface'
Str $.name is rw
Str $.title is rw = 'NO_TITLE'
Str $.title-target is rw = '___top'
Str $.subtitle is rw = ''
Str $.modified is rw = now.DateTime.utc.truncated-to('seconds').Str
SetHash $.targets
Hash %.links
Str $.rendered-toc is rw
Str $.rendered-index is rw
Credits
When a RakuDoc source is being processed, data is collected about numerous items, such as the Table of Contents, the Index, list and definition entries.
Many RakuDoc blocks allow for recursion, with blocks being embedded within each other. A ProcessState object is therefore created to contain all the intermediary data.
One ProcessState object can be added to another, and so once one block has been processed, it can be 'added' to the ProcessState object of the containing block.
Finally, when an entire RakuDoc source has been fully rendered, it is useful to retain all the intermediary data structures as well.
The overall RakuDoc::Processed object contains data related to the source as well as the rendered data.
By keeping track of the timestamps of the source file and the rendering, it will be possible to determine whether to render a source again, or not.
String of rendered source, may contain Promises during rendering
Table of Contents data Ordered array of { :level, :text, :target, :is-heading } level - in heading hierarchy, text - to be shown in TOC target - of item in text, is-heading - used for Index placing
heading numbering data Ordered array of [ $id, $level ] $id is the PCell id of where the numeration structure is to be placed level - in heading hierarchy
Index (from <span id="index-entry-"><span style="color:green; background-color: antiquewhite;"></span></span> markup) Hash entry => Hash of :refs, :sub-index :sub-index (maybe empty) is Hash of sub-entry => :refs, :sub-index :refs is Array of (Hash :target, :place, :is-header) :target is for link, :place is section name :is-header because <span id="index-entry-_0"><span style="color:green; background-color: antiquewhite;"></span></span> in headings treated differently to ordinary text
Footnotes (from <a id="N<>" href="#fn_target_N<>"><sup>[ 1 ]</sup></a> markup) Ordered Array of :$text, :$retTarget, :$fnNumber, :$fnTarget text is content of footnote, fnNumber is footNote number fnTarget is link to rendered footnote retTarget is link to where footnote is defined to link back form footnote
Semantic blocks (which includes TITLE & SUBTITLE) can be hidden Hash of SEMANTIC => [ PStr | Str ]
An array of warnings is generated and then rendered by the warnings template The warning template, by default is called by the wrap-source template RakuDoc warnings are generated as specified in the RakuDoc v2 document.
An array of accumulated rendered items, added to body when next non-item block encountered
An array of accumulated rendered definitions, added to body when next non-defn block encountered
An array of accumulated rendered numbered items, added to body when next non-item block encountered
An array of accumulated rendered numbered definitions, added to body when next non-defn block encountered
Hash of definition => rendered value for definitions
Array to signal when one or more inline defn are made in a Paragraph
All of the ProcessState attributes, and the following.
Information about the RakuDoc source, eg file name, path, modified, language
The output format that the source has been rendered into
Text between =TITLE and first header, used for place before first header
Name to be used in titles and files name can be modified after creation of Object name can be set when creating object if name is not set, then it is taken from source name + format
String value of TITLE.
Target of Title Line
String value of SUBTITLE, provides description of file
When RakuDoc Processed Object modified (source-data should be earlier than RPO.modified)
target data generated from block names and :id metadata A set of unique targets inside the file, new targets must be unique
Links (from link-label markup) Hash of destination => :target, :type, :place, :link-label target = computed URL (for local files), place = anchor inside file type has following values:
• Internal are of the form '#this is a heading' and refer to anchors inside the file
• Local are of the form 'some-type#a heading there', where 'some-type' is a file name in the same directory
• External is a fully qualified URL
Rendered version of the ToC
Rendered version of the Index
Richard Hainsworth aka finanalyst
v0.2.1
1 |^|
: %.index
, %.index
, Str $.front-matter is rw = 'preface'
Rendered from docs/docs/Processed.rakudoc at 15:33 UTC on 2024-06-19
Source last modified at 15:32 UTC on 2024-06-19