jgm/djot

Introduce leaf div (with `::`)

chrisjsewell opened this issue · 0 comments

Currently, there is no way to write a single line (leaf) div, which would be nice for the "terseness" of the syntax.

I propose allowing:

::name This is the content
which can break over multiple lines if really necessary

This is another paragraph

Which would act exactly as:

:::name
This is the content
which can break over multiple lines if really necessary
:::

This is another paragraph

This is somewhat motivated by the world of restructured text, where you can do:

.. note:: This is the body of a short note

.. note:: This short note has "attributes"
   :class: name

.. note::

    A longer form note

Note this also has some read across to https://talk.commonmark.org/t/generic-directives-plugins-syntax/444

Does @jgm (or anyone) forsee a particular issue with this syntax?