Would it be a problem to overload the code block syntax without the !
differentiator?
What if the author intend for import
below to be just plain code blocks, but with import
syntax highlighting etc…
```import
src: file.md
```
I would suggest to encourage developers and users to stick to !
, and keep the optional exclamation mark as an optional feature. It doesn’t seem much of an overhead to require the usage of !
.
On additional thought, the bit after the content-type-declaration
as you describe it. I think we don’t really need to enforce usage of YAML, since we can just pass the info string directly to whoever needs to handle it. However we can encourage best practices by providing a library that can parse the infotext in a consistent manner, but still allow for the developers to use the infotext in anyway they want.
It could be possible to restrict the info string between closing code fence brackets, to allow for additional keys via consistent attribute syntax as discussed here.
e.g.
``` !import <infotext for !import handler> ``` { key=value }
src: file.md
``````````````````````````````````````````````
Oh and just in case. The concept here is that the content inside the fenced block is not necessarily only YAML encoded. It’s can be anything. It’s up to the external plugin/preprocessor/postprocessor/AST/etc… to deal with.