Block Directives

Yes, I still like this syntax for block directives as well:

!!!name
content
!!!

or for that matter:

@@@name
content
@@@

with optional [label](arg){#myId .myClass key=val key2="val 2"} like:

@@@asciiDiagram[_lovely_ cat]{ width=100 }
  |\_/|
 / @ @ \
( > º < )
 `>>x<<´
 /  O  \
@@@

Maybe separating spaces should be allowed for block directives: [] () {}

The body/content for block directives could be optional as well, so this:

@@@youtube[Funny video](dQw4w9WgXcQ)

renders as:

<figure>
    <iframe width="420" height="315" src="//www.youtube.com/embed/dQw4w9WgXcQ" frameborder="0" allowfullscreen></iframe>
    <figcaption>Funny video</figcaption>
</figure>

while this:

see @wikipedia[Foobar]

renders as:

<p>
  see <a href="https://en.wikipedia.org/wiki/Foobar">Foobar</a>
</p>

And as @lu_zero mentioned, for simple cases attributes added to existing elements already suffice (see the proposed attribute syntax).

1 Like