mr_markdown_builder

[ Back to examples index ]


Links, Images & Miscellaneous

Generated by examples/links-and-media.js, covering link, image, imageWithSize, anchor, namedAnchor, quote, alert, footnoteRef/footnoteDefs, badge, tag, collapsible, ins/sub/sup, br, mention, issueRef, emoji, colorSwatch, mathInline/mathBlock, comment, and the small formatting helpers.

Images

placeholder image A fixed-height variant, for when a raw markdown image tag can’t control size: placeholder image, fixed height

Anchor

anchor('_A Header With Special Characters!_')#a-header-with-special-characters

Quote

Every line of a multi-line string gets its own blockquote marker:

First line of the quote. Second line of the quote.

GitHub Alerts

A blockquote whose first line is a [!TYPE] marker; type must be one of NOTE, TIP, IMPORTANT, WARNING, or CAUTION: [!NOTE] Highlights information that users should take into account, even when skimming. [!WARNING] Urgent info that needs immediate attention to avoid problems.

Footnotes

This library ships as a fork of the archived markdown-builder1, with a few enhancements of its own2. Reference a footnote inline with footnoteRef(id); render all of the definitions together, wherever you want them to appear, with footnoteDefs(entries). There’s no auto-numbering – you supply each id.

Badges & tags

tests license markdown example

Collapsible section

Click to expand This content is hidden until the reader expands the section.

Arrows and whitespace helpers

↑ up, ↓ down, ← left, → right (a non-breaking space before this text, from space())

Text-level HTML helpers

underlined, subscript, and superscript all render via their HTML tags, since GFM has no dedicated syntax for them.
This line ends with a hard break from br(), so this text starts on a new line without a blank paragraph between them.

GitHub-specific shorthand

Math

Inline: $E = mc^2$

\[\sum_{i=1}^{n} i = \frac{n(n+1)}{2}\]

Comments

Comments render nothing in this spot; view the raw markdown to see it.


Back to top

Jump to the top of this page

  1. See Chalarangelo/markdown-builder , now archived. 

  2. Tables, GitHub alerts, checked task items, aligned columns, nested lists, footnotes, math, and more – some definitions span multiple lines, and the continuation stays indented under the marker.