-
Notifications
You must be signed in to change notification settings - Fork 188
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add data-noescape to highlightjs callouts #167
Conversation
Explained that source-highlighter must be defined
Made changes to avoid doctest failures. Will merge if tests all clear. Thanks! |
Hm, what I intended was that the data-noescape attribute should not appear if |
Per the tests you referred, we should have the intended behavior. That said, I think the converter is not set in html5 mode. That's why we get |
I just manually confirmed that with <div class="listingblock"><div class="content"><pre class="highlight"><code>fn main() {
println!("Hello World!");
}</code></pre></div></div> |
Also html source code will still be escaped with this. It looks we're fine :) |
Is this something we should add to core as well? highlight.js can really be configured to ignore the callout bubbles? This is something for which we've long been seeking a solution. |
@mojavelinux: This seems to be a reveal.js feature not a highlightjs one: https://github.com/hakimel/reveal.js/blob/a0c013606e130baad976195730dcd7e7cd9e2855/plugin/highlight/highlight.js#L62 However you might want to reimplement that inside your html5 converter. |
There is something I haven't thought of before that will be broken with this change: when the code in the listing is html... I'll open a new ticket about that. |
It works out ok after all. |
I see now. It was actually reveal.js that was causing the problem. All we want is for reveal not to mess with the block since it was working before reveal.js started messing with it. And it turns out, highlight.js doesn't have problems with callouts in the HTML (it seems to understand how to skip them), so we're actually good. |
Closes #166