Markdown
MMO\core\helpers · 1 symbol · generated 30 Nov 2026
Markdown
Markdown.php:11Writing Markdown (GitHub's flavour) from what a document holds: a value made text, a table, a line escaped. What the readers of Office files and PDFs write their text with (Document::toMarkdown,
- Namespace
MMO\core\helpers- See
Document::toMarkdown, mmo.pdf'sPdfReader).
Index
| Cell($value) static | A table cell: escaped, on one line (its line breaks become <br>). | |
| Escape($text) static | Escape what Markdown would read as markup in a line of text: emphasis, code, links, html, and a line starting as a heading, a list or a quote. | |
| FrontMatter($values) static | A YAML front matter, between its --- lines: each value written as JSON, which YAML reads; an array of keys one level down. | |
| Inline($text) static | Escape what Markdown would read as markup anywhere in a line (emphasis, code, links, html): a piece of a line, whose start is not the line's. | |
| Table($rows, $raw) static | A table. The first row is its header; every row is made as long as the longest. | |
| Value($value) static | A value as text: a date as Y-m-d (with its time when it has one), a boolean as TRUE/FALSE, a float without its binary noise. |
Methods6
Cell($value)
staticMarkdown.php:52A table cell: escaped, on one line (its line breaks become <br>).
Escape($text)
staticMarkdown.php:34Escape what Markdown would read as markup in a line of text: emphasis, code, links, html, and a line starting as a heading, a list or a quote.
FrontMatter($values)
staticMarkdown.php:89A YAML front matter, between its --- lines: each value written as JSON, which YAML reads; an array of keys one level down.
Inline($text)
staticMarkdown.php:44Escape what Markdown would read as markup anywhere in a line (emphasis, code, links, html): a piece of a line, whose start is not the line's.
Table($rows, $raw)
staticMarkdown.php:64A table. The first row is its header; every row is made as long as the longest.
| $rows | array | each row's cells, already made Markdown when $raw. |
| $raw = false | bool | the cells are Markdown already (links...): only their line breaks and pipes are made safe. |
| returns | string |
Value($value)
staticMarkdown.php:17A value as text: a date as Y-m-d (with its time when it has one), a boolean as TRUE/FALSE, a float without its binary noise.