unified

Project: benabel/remark-fenced-divs

Package: remark-fenced-divs@1.1.2

  1. Dependencies: 0·Dependents: 2
  2. remark plugin to enable pandoc fenced_divs
  1. remark 205
  2. unified 155
  3. markdown 133
  4. plugin 132
  5. html 110
  6. mdast 81
  7. remark-plugin 72
  8. stringify 18
  9. compile 13

remark-fenced-divs

Note!

This plugin isn't ready for the new parser in remark (remarkjs/remark#536). You need to use remark version lesser than 13.

Getting started

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: