mr_markdown_builder

[ Back to examples ]


Feature Showcase

This page is generated by examples/feature-showcase.js and exercises every function mr_markdown_builder exports. Regenerate it with node examples/feature-showcase.js whenever the module changes.

Headers

h1 header

h2 header

h3 header

h4 header

h5 header
h6 header
hX(9, …) clamps to h6

Emphasis

Lists

Unordered (ul)

Ordered (ol), with a callback

  1. FIRST ITEM
  2. SECOND ITEM

Task list (tl), mixing plain strings and checked items

Nested lists (embed a rendered ul()/ol()/tl() in an item)

Tables

Default (unaligned) columns

| Left | Center | Right | | — | — | — | | a | b | c | | d | e | f |

Per-column alignment

| Left | Center | Right | | :— | :—: | —: | | a | b | c | | d | e | f |

Miscellaneous

Quote (multi-line)

Every line of this string is prefixed with a blockquote marker.

GitHub Alert

[!TIP] alert() renders a [!TYPE] blockquote for NOTE/TIP/IMPORTANT/WARNING/CAUTION.

Badges and tags

build example

Collapsible section

Click to expand Hidden content lives here.

Arrows and whitespace helpers

↑ ↓ ← → (space helper before this text)

Text-level HTML: ins, sub, sup, and a hard break via br()

underlined sub sup
This line follows a hard break.

GitHub shorthand: mention, issueRef, emoji, colorSwatch

@octocat #42 :tada: #1d9bf0

Math: mathInline and mathBlock

$E = mc^2$

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

comment (renders nothing visible)

namedAnchor (a manual, non-heading anchor point)

Linkable via #showcase-anchor

Footnotes: footnoteRef and footnoteDefs

A claim that needs a source[^1]. [^1]: The footnote definition, rendered wherever footnoteDefs() is called.

GeoJSON / TopoJSON code blocks

{
  "type": "Feature",
  "geometry": {
    "type": "Point",
    "coordinates": [
      -117.078046,
      32.934771
    ]
  },
  "properties": {
    "name": "Example point"
  }
}
{
  "type": "Topology",
  "objects": {},
  "arcs": []
}

Mermaid diagram

graph TD;
  A[Start] --> B[End];