[kramdown-users] Problem with new extension syntax

Thomas Leitner t_leitner at gmx.at
Wed Apr 28 02:26:19 EDT 2010


> > As for the syntax: In the case of not having custom extensions, it
> > can be simplied to something like the following (same for block and
> > span extensions):
> > 
> >   {:comment}some comment{:/comment}      # verbose form
> >   {:comment}some comment{:/}             # short form
> >   {:options key="val" /}                 # no-body form
> > 
> > In this case we also don't need an extra differentiator like `!` at
> > the beginning of a extension name since the names are "well known".
> > Also note that the short form would need to have the leading colon
> > as well!
> 
> So you're suggesting that the extension names be "reserved words,"
> not available as ALD reference names.  I'm cool with that.

Now I finally completely understand what you meant here ;-) I simply
overlooked this case...

The problem is that

    {:comment}

can either be an IAL referencing the ALD named "comment" or the start
tag of an extension. This should not be the case! It should
syntactically be clear whether this is an extension or an IAL. Also,
since Maruku uses the above syntax for declaring an IAL, we would break
compatibility if we just reserved some ALD names.

Therefore I suggest using two colons before the extension name, like
this:

    {::comment}some comment made here{:/comment}
    {::options key="val" /}

This would remedy the situation but needs another character for
differentiation.

Suggestions? Ideas? Comments?

-- Thomas


More information about the kramdown-users mailing list