[kramdown-users] Problem with new extension syntax

Shawn Van Ittersum svicalifornia at gmail.com
Wed Apr 28 09:33:37 EDT 2010

Well, I prefer {:!comment...}, but double-colon works too.


On Wed, 28 Apr 2010 08:26:19 +0200, Thomas Leitner wrote:
>>> 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
> _______________________________________________
> kramdown-users mailing list
> kramdown-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/kramdown-users

More information about the kramdown-users mailing list