🪵 bbmd

Hacks

These blocks use HTML or obscure Markdown tricks to achieve effects not covered by any spec. They work in most renderers but are not guaranteed everywhere.

Comment

Hide content from rendered output using the link-reference-definition trick ([text]: #). Useful for leaving notes in generated markdown that won't be visible to readers.

FactoryAliases
b.comment()b.hiddenFromHumans()
b.comment("TODO: revisit this section")
[TODO: revisit this section]: #

Details

Create a collapsible <details> / <summary> block using raw HTML.

FactoryAliases
b.details()—
b.details("The hidden content goes here.")
<details>
  <summary></summary>
  The hidden content goes here.
</details>

Methods

MethodDescriptionAliases
.summary(...content)Set the visible summary text—
b.details("The hidden content goes here.")
  .summary("Click to expand")
<details>
  <summary>Click to expand</summary>
  The hidden content goes here.
</details>

The .summary() method accepts inline content only (text, bold, italic, etc.). The body of the details block can contain any block-level content including lists, code blocks, and nested structures. Body content is indented inside the <details> HTML.

Multiline content works too:

b.details(
  "First paragraph.",
  "Second paragraph.",
).summary("More info")
<details>
  <summary>More info</summary>
  First paragraph.
  Second paragraph.
</details>

Underline

Render underlined text using the <ins> HTML tag.

FactoryAliases
b.underline()b.u()
b.underline("underlined text")
<ins>underlined text</ins>
b.paragraph("This is ", b.u("very important"), ".")
This is <ins>very important</ins>.

On this page