cabo / kramdown-rfc

An XML2RFC (RFC799x) backend for Thomas Leitner's kramdown markdown parser
MIT License
195 stars 83 forks source link

support for ``` for artwork elements #239

Open rohanmahy opened 4 months ago

rohanmahy commented 4 months ago

I seem to remember that both triple backtick and triple tilde were allowed to delimit an block in the vague indeterminate past. in kramdown-rfc 1.7.17 only triple tilde is supported.

Is this a change?

In any case, it would be nice to support both.

cabo commented 4 months ago

``` is a code span delimiter in markdown. The codeblock delimiter (fenced codeblocks) is ~~~. (Please see the source of this comment to see why ``` is a code span delimiter.)

Upstream kramdown implements that; I'm not aware of having implemented anything beyond that. So no, I don't think kramdown-rfc lost some functionality.

Obviously,

```
foo
```

is a paragraph with a code span inside, which can almost act like a codeblock in certain cases.

The problem with turning ``` into another codeblock fence is that this can change the meaning of existing documents. The footprint of such a change is probably small, so it can be argued whether that is worse or the confusion with people who learned markdown from GFM is worse. So I'll leave this issue open, in search for a good argument to add the alternate GFM fenced codeblock syntax to kramdown-rfc, or even possibly a better solution.