Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Let highlight assume raw #581

Closed
trans opened this Issue · 3 comments

2 participants

7rans Parker Moore
7rans

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}}
    {{/each}}
  {% 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.

Parker Moore
Owner

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.

7rans

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.

Parker Moore
Owner

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.

Parker Moore parkr closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.