[kramdown-users] Syntax for specifying code highlighting language | Github flavored code blocks style
Lou Quillio
quillio at gmail.com
Sat Sep 1 05:33:47 UTC 2012
On Fri, Aug 31, 2012 at 11:47 AM, Eric Sunshine <sunshine at sunshineco.com> wrote:
> 1) [Github alternate fenced blocks]: I am not a fan of this and other
> gratuitous differences from the norm, and my gut reaction is to reject
> the change. The only small justification I can make for accepting it
> is that it would increase the likelihood of kramdown being employed
> locally to compose and preview a Markdown document which ultimately
> will be viewed in rendered form on Github.
(Not picking on Eric here, just easier to jump-off from his post.)
I don't think that accepting backticks on the same rules as tildes is
likely to collide with anything -- and it has a consistency logic.
Things that are good for kramdown and don't cause user pain are good.
Within limits. Thomas is a good judge of those limits.
> 2) [specify language on ~~~ line]: Seems like a reasonable convenience.
Agree.
> 3) [syntax highlighting language]: kramdown has been around long
> enough and (presumably) is widely enough used that
> backward-incompatible changes should not be undertaken lightly. If I
> understand correctly, the backward-incompatible change to which you
> refer is that kramdown would no longer recognize lang=FOO specially.
> In the interest of backward-compatibility, perhaps continue to
> recognize lang=FOO if the following is true: .language-FOO is not
> present and the FOO in lang=FOO does not seem to be a natural language
> specification [2]. (Rough heuristic: If FOO contains a hyphen or is
> only two characters in length, then it's probably a natural language
> specification.)
Maybe this idea needs more time to marinate, see what people do in the
real world. Setting a lexer with 'lang=' has a narrow and different
purpose than natural-language setting, and I'm a bit uncomfortable
with conflating them. If it turns out to be an uncomplicated, common
markup practice, then it's safe. We just don't know yet, and there'd
be a little pain. To me, there's no rush on this one.
By chance, wrt RFC1766, the author is a colleague. I'll ping and get
his opinion.
LQ
--
Lou Quillio
http://quillio.com/
More information about the kramdown-users
mailing list