[kramdown-users] Inline comments

Thomas Leitner t_leitner at gmx.at
Tue Apr 13 05:33:40 EDT 2010


On Tue, 13 Apr 2010 16:36:06 +1000, Shawn Van Ittersum wrote:
> 1. There would have to be a suitable inner prefix to isolate Markdown
> tags from other valid XML.  ERB has <% %>, PHP has <? ?>, HTML
> reserves <!  > for comments, ASP, JSP, Perl Template::Toolkit, and
> other templating engines all have their own syntaxes.  It's a
> dangerous land mine.

No inner prefix, just a plain XML namespace, ie.
{::comment}...{:/comment} becomes <md:comment>...</md:comment>. This
should be compatible with all HTML template languages! However, I
already mentioned this suggestion in another thread about "Backward
incompatible changes..." and the answers clearly showed that a
consistent syntax was preferred over extension via XML namespaces.

Regarding nesting of tags: think about how Java multiline comments
cannot be nested (ie. `/* .... */`). The same is currently true for
kramdown extensions.

Another point: there needs to be a way to mark an extension that does
not have a body. This is currently done by using two colons instead of
one after the extension name. I would like to keep the syntax easy, ie.
everything between `{::NAME` and `}` should be syntactically equal to
the contents of an IAL. Therefore the only place to add information
whether the extension has a body or not is directly before or after
`NAME`.

> 2. IALs are used to modify DOM blocks and spans.  It seems very weird
> to use a XML-like tag to modify an adjacent DOM element.  That would
> be like an HTML tag modifying another peer-level HTML tag, like so:
>
> <SNIP />
>
> <kd-ial .important>
> This is an important notice
> <kd-/>
> 
> This example also clearly shows that the IAL syntax of unquoted
> strings inside an IAL doesn't look right at all inside an XML-style
> tag.

IALs won't be affected, this discussion is purely about the extensions
and its syntax, ie. comment, nomarkdown and options. 

-- Thomas


More information about the kramdown-users mailing list