A region is a block of Remark text, together with the type of an html-element to wrap the block in.
Remark extends Markdown to support regions.
A region is defined by starting a line with !!!
, and then writing a start-tag of an html-element. This begins a block whose content is denoted by indentation — exactly as with list items.
The content-type can be set through the remark-content
attribute. The possible values are:
remark
remark-no-p
<p>
elements.text
!!! <div class = "test">
This is in the region.
This is too.
* All nested notation is contained in the region, no matter how complex.
* Another list item.
This is in the region.
This is too.
<p>
elements!!! <div class = "test" remark-content = "remark-no-p">
This is in the region.
This is too.
* All nested notation is contained in the region, no matter how complex.
* Another list item.
!!! <div class = "test" remark-content = "text">
This is in the region.
This is too.
* All nested notation is contained in the region, no matter how complex.
* Another list item.
The region extension provides a robust way to wrap content into html-elements. In particular, the region extension allows Remark to wrap content in <div>
elements, so that they can be styled via CSS.
The region extension was written because, in April 2015, Python Markdown had problems interleaving Markdown and html. While this worked reasonably well in old versions of Python Markdown, it did not work anymore in newer versions. We solved this by extending Python Markdown with regions. The !!!
notation was chosen because the admonition extension already used it.