Closed dannguyen closed 8 years ago
Did this ever work for you with middleman-syntax? That is, is this a regression? I don't see how we could support this given that Rouge doesn't allow specifying extra attributes for their pre
tag. See https://github.com/jneen/rouge/blob/master/lib/rouge/formatters/html.rb#L48 for the relevant code.
FWIW, as maintainer of Maruku (which Kramdown inherited the inline attribute syntax from), I feel that once you start resorting to inline attributes you really want something closer to HTML, not Markdown. Markdown is meant for simple, readable-as-text formatting.
That's a good point. I honestly don't know. My intention was to use data attributes to specify line-by-line highlighting, as it's possible in Sphinx and as postulated here: http://zpao.com/posts/adding-line-highlights-to-markdown-code-fences/
That way, i could write a javascript helper to do the client-side highlighting, as it's out of the scope of middleman-syntax (and Rouge). I wasn't aware of the internals of how Rouge worked but it makes sense that it wouldn't necessarily inherit from Kramdown's superset. Thanks for the reply!
In Kramdown, Inline Attribute Lists allow for this:
Which results in the code block adopting those attributes. Here's the result using the standard syntax highlighter option and setting it to CodeRay, and not activating middleman-syntax:
Currently using Middleman 4.0...don't know if that would make any difference