Well that’s the idea behind giving people the flexibility of choosing how their fenced block may look like.
I did try thinking of what a “fenceless” paragraph look like, and it’s not that good. Plus it makes it hard to deal with multiline blocks like so:
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
!extensionName:
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
Thus by letting people define their own “fence character” for directives it would be more obvious, and would also drastically reduced chances of collision with other fenced syntaxes.
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
!extensionName:
000000000000000000000000000000000000000000000000000000000000000000 {.style}
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
000000000000000000000000000000000000000000000000000000000000000000
!extensionName:
`````````````````````````````````````````````````````````````````` {.python}
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
``````````````````````````````````````````````````````````````````
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
Specially detected block :
Perhaps we should amend the flexible fence concept, to allow for detection of “special blocks” (which I think lu_zero wanted in terms of the {} syntax) (And I think there is some others like pandoc YAML block ---
, ...
)
(Oh, and another thing added. The directive will ignore the ‘{}’ attribute in beginning of flexible syntax, for determine the flexible fence characters.)
!extensionName: param
< repeated sequence of character | or | Start block of a special markdown block > {#id .Style}
... content to read into !extensionName ...
< repeated sequence of character | or | End block of a special markdown block>
Allows for ::
|| Pandoc’s YAML ---
, ...
(Though I would say it’s better to just use ---
):
!YAML:
---
title: 'This is the title: it contains a colon'
name: Author One
affiliation: University of Somewhere
...
|| CSS/C/etc… {} style as proposed by lu_zero… doesn’t look good tho. And potentially dangerous) :
!css:
{
body {
overflow: hidden;
background: #000000;
}
}
Overall, the biggest pro for flexible fencing for directives is that leverage the commonmark fencing tradition of “repeated characters for start and end markers”, and has good collision resistance.