unified

Project: benabel/remark-fenced-divs

Package: remark-fenced-divs@1.1.1

  1. Dependencies: 0·Dependents: 1
  2. remark plugin to enable pandoc fenced_divs
  1. remark 182
  2. unified 143
  3. plugin 130
  4. markdown 104
  5. html 103
  6. remark-plugin 72
  7. mdast 72
  8. stringify 15
  9. compile 11

remark-fenced-divs

Fenced divs are some kind of generic syntax for block contents with a syntax similar to fenced code blocks but using a 3 colons ::: as delimiter instead of ```.

It allows a simple word used as a class in html:

::: my-class
This is a paragraph.
:::

Will be rendered in html as:

<div class="my-div">
    <p>This is a paragraph.</p>
</div>

Or extended attributes syntax in curly braces:

::: {#navbar .container .right key=1 key2="value 2"}
This is a paragraph.
:::

Will be rendered in html as:

<div id="navbar" class="container right" data-key1="1" data-key2="value 2">
    <p>This is a paragraph.</p>
</div>

Syntax details

From pandoc reference: https://pandoc.org/MANUAL.html#extension-fenced_divs

Acknowledgments

Code adapted from: