res:plugins:parsedown
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| res:plugins:parsedown [2026/04/23 21:49] – [Changelog] fraenkiman | res:plugins:parsedown [2026/05/01 21:18] (current) – [Description] fraenkiman | ||
|---|---|---|---|
| Line 12: | Line 12: | ||
| * Super Fast | * Super Fast | ||
| - | * Extensible | + | * Extensible |
| Why Parsedown? It's faster, more consistent and is being actively developed. | Why Parsedown? It's faster, more consistent and is being actively developed. | ||
| Line 18: | Line 18: | ||
| [[https:// | [[https:// | ||
| However, as CommonMark continues to evolve, compliance should improve. | However, as CommonMark continues to evolve, compliance should improve. | ||
| + | |||
| + | ===== Requirements ===== | ||
| + | |||
| + | You need: | ||
| + | |||
| + | * a working ≥ [[en: | ||
| + | * PHP **7.2 to 8.5** | ||
| + | * the plugin files from [[res: | ||
| + | |||
| + | |||
| + | ===== How FlatPress uses the plugin ===== | ||
| + | The plugin registers Markdown parsing for: | ||
| + | |||
| + | * entries: '' | ||
| + | * excerpts: '' | ||
| + | * comments: '' | ||
| + | |||
| + | FlatPress' | ||
| + | |||
| + | Parser configuration in this plugin: | ||
| + | |||
| + | * safe mode is **off**: Parsedown itself does not remove raw HTML | ||
| + | * markup escaping is **off**: raw HTML is kept unless another FlatPress/ | ||
| + | * strict mode is **off**: Parsedown accepts some Markdown forms more generously | ||
| + | * URL linking is **on**: absolute '' | ||
| + | * automatic line breaks are **off**: a normal newline inside a paragraph stays a newline; use Markdown hard-break syntax when a ''< | ||
| + | |||
| + | Security note: Enable raw HTML only for trusted authors. Comment text is still stored escaped by FlatPress; the plugin selectively restores only safe Markdown autolinks immediately before parsing. | ||
| + | |||
| + | ===== Parsedown Extra availability ===== | ||
| + | The plugin prefers Parsedown Extra when all of the following PHP features are available: | ||
| + | |||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | |||
| + | If these PHP features are missing, the plugin falls back to plain Parsedown. In that fallback mode, the " | ||
| + | |||
| ===== Markdown syntax ===== | ===== Markdown syntax ===== | ||
| Line 150: | Line 188: | ||
| ==== Tables with preformatted cells ==== | ==== Tables with preformatted cells ==== | ||
| + | Alignment markers: | ||
| + | '': | ||
| < | < | ||
| | :-- | :-- | | | :-- | :-- | | ||
| Line 193: | Line 233: | ||
| This is [an example] [id] for a reference link | This is [an example] [id] for a reference link | ||
| - | [id]: http:// | + | [id]: http:// |
| - | + | ||
| - | [id]: < | + | |
| - | + | ||
| - | [Link back to header 1](# | + | |
| + | ## Header 1 ## {#anchor} | ||
| + | [Link back to header 1](# | ||
| ==== Automatic links ==== | ==== Automatic links ==== | ||
| Line 215: | Line 253: | ||
| __double underlines__ | __double underlines__ | ||
| - | Lord*God*sacrament | + | Lord*God*Sacrament |
| - | \*This text is enclosed | + | This is ~~deleted text~~. |
| + | |||
| + | \*This text is surrounded | ||
| *italics*, **bold** and ***bold italics*** or | *italics*, **bold** and ***bold italics*** or | ||
| Line 299: | Line 339: | ||
| - | ===== License | + | ===== Parsedown Extra syntax |
| - | [[https:// | + | The syntax in this section works only when Parsedown Extra is active. See "[[res:plugins:parsedown# |
| + | ==== Special attributes for headers ==== | ||
| + | < | ||
| - | ===== Requirements | + | ## Header with class {.important} |
| + | |||
| + | ## Header with ID and class {#my-header .important}</ | ||
| + | |||
| + | Then link to the header with: | ||
| + | |||
| + | < | ||
| + | |||
| + | ==== Special attributes for links and images | ||
| + | < | ||
| + | |||
| + |  | ||
| + | * Documentation expanded to include the Parsedown Extra syntax | ||
| == 2026-04-23: Version 1.1.2 == | == 2026-04-23: Version 1.1.2 == | ||
| * Comments continue to be stored in a sanitized format. Only safe autolinks are restored immediately before parsing. | * Comments continue to be stored in a sanitized format. Only safe autolinks are restored immediately before parsing. | ||
res/plugins/parsedown.1776973793.txt.gz · Last modified: by fraenkiman
