I use showoff with kramdown for slides, but @@@ doesn’t work correctly.
# Example #
@@@ xml
<W C="VBN" id="W151" o1="758" o2="767">inhibited</W>
@@@ prolog
[inhibited]
This renders the @@@ prolog part as it would be yet another bit of
the same codeblock, like this:
<W C="VBN" id="W151" o1="758" o2="767">inhibited</W>
@@@ prolog
[inhibited]
I’d like it this way:
<W C="VBN" id="W151" o1="758" o2="767">inhibited</W>
[inhibited]
It doesn’t generate a second <pre><code> tag for the @@@ prolog part, therefore showoff doesn’t find it.
html.css('pre').each do |pre|
pre.css('code').each do |code|
lines = out.split("\n")
if lines.first.strip[0, 3] == '@@@'
...
Changing the source to
@@@ xml
<W C="VBN" id="W151" o1="758" o2="767">inhibited</W>
<pre><code>
@@@ prolog
[inhibited]
</code></pre>
doesn’t activate the second highlighting. It works if I manually set the css classes, but that’s a hack only.
It’s a bit of a hack but this seems to work for me: