Let highlight assume raw #581

trans opened this Issue Jun 18, 2012 · 3 comments

2 participants


I ran into an issue today where my highlighted code will not show up. An abbreviated example to demonstrate:

  {% highlight javascript %}
    {{each(i,s) scope}}
  {% endhighlight %}

Problem is clearly that the {{...}} brackets are being parsed by liquid. To fix I need to use {% raw %}. The majority of time that's what people are going to want, so rather then having to account for the potential manually it would be better if highlight assumed raw. An extra option could be added to highlight for the rare cases when one needs to do otherwise, e.g. {% highlight notraw %}.

This is especially useful to me both for the fact that I using a Gollum wiki to write my posts, and I am using the new Redcarpet2 patch that supports the ``` notation. In fact the redcarpet patch (#570) might want to assume raw on its own for now, until this (and if this) issue is accepted.

Jekyll member

I don't think that's what our users will want the majority of the time. I do agree that that's what your particular use case needed though.


Oh? It seems very unusual to me to want the generate code examples to be highlighted. Have you seen many cases of this?

But that's fine if at least ``` is treated as raw, that would be good enough.

Jekyll member

The triple-tick is a RedCarpet 2 extension. I've started bugging @mojombo about releasing a patch Jekyll version, 0.11.3, with RedCarpet 2 support.

@parkr parkr closed this Mar 19, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment