[kramdown-users] Syntax of IALs, ALDs and extensions

Eric Sunshine sunshine at sunshineco.com
Tue Apr 20 10:48:01 EDT 2010


On 4/20/2010 4:17 AM, Thomas Leitner wrote:
> What you want to achieve can already be achieved in a much simpler way:
> just use ERB tags and run ERB first and the kramdown. This will do
> exactly what you want! And it is much more flexible than any solution
> within kramdown. If you don't want to be tied to a syntax that is Ruby
> specific, you can use another template processor like [moustache] which
> is language agnostic.

I agree with Thomas. It seems better for kramdown to remain 
(programming) language-agnostic, and to have proper separation between 
mark-up and ERB-like functionality. Such separation provides at least a 
couple important benefits: (1) Simplifies implementation of 
kramdown-compatible processors in other languages (Python, C#, etc.) 
since they do not have to incorporate Ruby-isms. (2) Greatly reduces the 
need for other kramdown-compatible implementations since one 
language-agnostic implementation can suffice for many needs. (Take HAML, 
as a counter-example, where clones or near-clones have popped up because 
people want to embed their favorite language -- Python, Lua, etc. -- 
within HAML, whereas the original only allows embedding Ruby.) With 
proper separation, users are free to employ whichever ERB-like 
pre-processor supports their favorite language.

> 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

I think this is reasonable and should be easily grasped by new users 
(especially those coming from XML/HTML). Also, it still retains the 
"essence" of existing Markdown extensions (IAL, ALD, etc.), and thus 
does not feel so out of place as some of the other proposals.

-- ES


More information about the kramdown-users mailing list