modulefdoc_markdown
Markdown to HTML, in the dialect of Python-Markdown with the extensions FORD uses: fenced code, tables, footnotes, definition lists, abbreviations, attribute lists, Markdown inside HTML, math, file inclusion, and FORD's links, aliases and admonitions.
The block parser follows Python-Markdown: the text is split into chunks at blank lines, and a tree is built by processors tried in a fixed order, so that indentation and lists behave the same. Inline text is then read left to right.
Documentation is rendered in parallel, so nothing here calls a function returning a deferred-length
string (see example/slen_race.f90).
Uses
Graphs
Uses
Used by
Variables
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
| BLOCK_TAGS | character(len=*) | privateparameter | 'addressarticleasideblockquotebodycenterdeldetailsdialogdirdivdlfieldsetfigcaptionfigurefooter'//'formh1h2h3h4h5h6headerhgrouphriframeinslimainmenunavnoscriptolppresectionsummarytable'//'tbodytdtfootththeadtrulcanvasmathobjectscriptstyle' | |
| ESCAPED | character(len=*) | privateparameter | '\`*_{}[]()>#+-.!' | |
| ETX | character(len=1) | privateparameter | achar(3) | ends it |
| MAX_DEPTH | integer | privateparameter | 48 | |
| NL | character(len=1) | privateparameter | achar(10) | |
| STX | character(len=1) | privateparameter | achar(2) | starts a placeholder for stashed HTML |
| WORD_CHARS | character(len=*) | privateparameter | 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_' |
Abstract interfaces
link_resolverprivate
Find what a [[...]] link means.
Types
footnote_tprivate
A footnote definition.
heading_tprivate
A heading, for the table of contents.
markdown_options_t
What rendering depends on.
node_tprivate
An element of the tree.
reference_tprivate
A link reference definition.
tree_tprivate
The state of one conversion.
Functions
adjustl_textpureprivate
text without leading blanks.
bracket_endpureprivate
The end of the [...] that opens at i, or 0.
fence_lengthpureprivate
The length of the code fence that line starts with, or 0.
find_referenceprivate
Find link reference id, returning its position or 0.
first_line_ofpureprivate
The first line of text.
first_wordpureprivate
The part of text before its first blank.
in_statepureprivate
True if the innermost parser state is state.
is_bullet_itempureprivate
True if block starts with a bullet list item.
is_ordered_itempureprivate
True if block starts with an ordered list item.
is_placeholderpureprivate
True if text is one placeholder.
is_setextpureprivate
True if the second line of block underlines the first.
is_tablepureprivate
True if block is a table: a header line with |, then a separator line.
item_textpureprivate
The position where the item text of a list line starts, or 0 if it is not one.
last_childpureprivate
The last child of node parent, or 0.
trimmed_endpureprivate
text without trailing line feeds.
Subroutines
admonition_blockrecursiveprivate
An admonition: a line @note Type, then indented text.
admonition_linesprivate
Turn @note blocks into a line @note Type followed by indented lines, ending at @endnote, a
blank line, another admonition, or the end of the text.
admonition_startprivate
The admonition type that starts at line, or '', with where it is and what follows it.
attribute_listprivate
Turn the contents of an attribute list, #id .class key=value, into HTML attributes.
closing_markpureprivate
Find where emphasis of width marks c opened before start closes.
collect_definitionsprivate
Remove link references, footnotes and abbreviations from lines and keep them.
dedentcommon
Remove the leading whitespace that all non-blank lines of lines share.
definition_blockrecursiveprivate
The definition list processor.
element_endpureprivate
The position of the end of the element starting at start, or 0.
expand_file_includesrecursiveprivate
Replace file include directives by the contents of the file.
find_definitionpureprivate
Find a definition line in block.
find_hash_headerpureprivate
Find the first # header line of block.
find_quotepureprivate
Find the first line of block that quotes.
find_rulepureprivate
Find a line of block that is a horizontal rule.
ford_linkprivate
Handle [[name(type):child(type)]], a link to an entity.
hash_headerrecursiveprivate
The # header processor.
indent_levelprivate
How deep block is in the lists of parent, and the node at that depth.
inlinerecursiveprivate
Write inline Markdown text as HTML.
inline_abbreviationprivate
Handle an abbreviation at i, if there is a whole word there.
inline_angleprivate
Handle <: an automatic link or inline HTML.
inline_backslashprivate
Handle a backslash: math, or an escaped character.
inline_bracketrecursiveprivate
Handle [: a FORD link, a footnote reference or a link.
inline_dollarprivate
Handle $: display math or an environment variable.
inline_emphasisrecursiveprivate
Handle * and _.
inline_entityprivate
Handle &: an entity stays as it is, anything else is escaped.
inline_smartpureprivate
Handle the punctuation that the smarty extension changes.
link_targetprivate
Read the (address "title") at open.
list_blockrecursiveprivate
The list processors.
list_indentrecursiveprivate
The indented block processor: block continues a list.
loose_detabprivate
Remove level indents from each line of block that has them.
markdown_to_htmlrecursive
Convert Markdown source to HTML.
new_nodeprivate
Add a child with tag tag to node parent, returning it.
normal_idprivate
id in lowercase, with runs of whitespace as single blanks.
normalize_linesprivate
Expand tabs and blank lines of only spaces.
paragraphprivate
The paragraph processor. In a tight list an item's text stays in the item.
parse_blockrecursiveprivate
Find the block processor for block and run it.
parse_chunksrecursiveprivate
Parse chunks into node parent.
parse_onerecursiveprivate
Parse the single chunk chunk into node parent.
parse_textrecursiveprivate
Parse text that may hold several chunks into node parent.
quote_blockrecursiveprivate
The block quote processor.
remove_markdown_attributeprivate
Remove markdown="..." from an opening tag.
render_childrenrecursiveprivate
Write the children of node id.
render_codeprivate
The HTML of an indented code block, whose first line may name its language.
render_footnotesrecursiveprivate
Write the footnotes that were referred to.
render_headingrecursiveprivate
Write a heading or definition term. With the toc extension headings get ids.
render_tablerecursiveprivate
Write a table.
row_cellsprivate
The cells of a table row, split at | outside code spans.
setext_headerrecursiveprivate
The underlined header processor.
split_chunksprivate
Split text at blank lines, as text.split('\n\n') does.
stash_fenced_codeprivate
Replace fenced code blocks by placeholders.
stash_htmlprivate
Keep html aside, returning the placeholder for it.
stash_html_blocksrecursiveprivate
Replace block-level HTML by placeholders, rendering the contents of markdown="1" elements.
substitute_aliasesprivate
Replace |alias| by its value. |alias| gives the text without the backslash.
table_rowrecursiveprivate
Write a table row with exactly as many cells as align has.
tag_atpureprivate
The tag at position at of line, in lowercase, or ''.
unique_idprivate
An id for a heading with text html, not used before. Like Python-Markdown's slugify, this drops
punctuation and turns each run of blanks and hyphens into one hyphen.
write_linkrecursiveprivate
Write a link.