Fair enough about how :
in !tl;dr: Summary Here
is harmful.
I guess encouraging !tl;dr[ Summary Here]
is not much more work.
⌠CommonMark Github repo that lists known extensions âŚ
In regard to a registry of known extensions. I would encourage a registry similar to âIP port number listâ, that defines the name, purpose, and input format ( But does not specify specific extension implementation, but only possible ones to use). Kind of like a linux âman pageâ,
e.g.
!video[ desc ]( url ){ #id .class width=<num1> height=<num2> }
Description: blabalba
desc: Describes balblabl
url: Links to blababl
⌠About the !name instead of @name, Iâm still on the fence. âŚ
If you are going to use @video[]()
you might as well use !
at least for media, since itâs already implies embeddable media like pictures. e.g. !video[]()
!audio[]()
. I suggested using !
as a directive signifier, since syntactically it already implies a more complex mapping of content to html.
The biggest point however, is that making images to be a special kind of directive, would allow for keeping it modular. This means better sandboxing of errors. And easier parsing. Since any issue can just be via fixing the image module
. (Thus keeping the core parser as small as possible. After all, the smaller anything is, the easier it is to review.)
Btw, chrisalleyâs idea for directives used as webcomponent declaration would map
!directiveName[*my* content](arg){.myClass key=val}
to (For illustrative purpose only)
<directiveName class="myClass" key="val" arg="argâ>
<em>my</em> content
</directiveName>
and only if it cannot find any internal extensions for !directiveName
.
A middle ground?
Perhaps if you want it to be a way to distinguish @
from core markdown !
, then how about treating @
as an extention of !
namespace for less commonly used extension. Where !
starts at root.
namespace, @
would start at root.extention.
.
@extentionName[](){}
maps to
!extention.extentionName[](){}
As for why? Well, you can imagine stuff like !video
and !audio
would be used nearly everywhere, while @sendPMto
for a specific site is of limited usage.
So the root namespace of !
would be more strictly defined, and can be assumed to work for majority of websites (that implemented these extensions). While the @
is a bit more site specific and ad hoc. Again, kind of like the philosophy between CommonMark strong speccing, and markdownâs anarchist leanings.
Annnnd, you could just restrict webcomponent detection to @
only. Thus minimising collision to !
namespace even further. (Since I envision that the same web components wonât really be used everywhere)
@unknownExt
â <unknownExt></unknownExt>
summery: !
for core directives. @
for ad hoc site specific directives.