-
Notifications
You must be signed in to change notification settings - Fork 73
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
Callout not properly rendered with slim & reveal.js #65
Comments
Note, the haml templates are behind the slim templates and will soon be removed once we verify we've ported any missing bits. I'm not surprised that callouts don't work since it requires dedicated logic in the template to get them right which may have not been done. Do you want to attempt to port the logic from the haml (if worth salvaging) and fixing it up so they look good when using the slim templates? |
I'll try my best! :) |
We'll be here to help! @obilodeau might be able to pitch in as well, but the more hackers, the merrier! |
Well, it's rather the other way around at first look. |
Check the deck.js backend. I know that it has support for such things...and a very similar output is needed. |
Does not seem to be a problem in the templates.
the result in the HTML file is
When I remove the source name from the block the error does not occur anymore, that is the So I assume that the error is in the rather old version of highlight.js that is packaged with reveal.js. So I downloaded a current version of highlight.js, replaced it in reveal.js/plugin/highlight and the error disappeared completely also when using the source name! |
Closing as the issue is not related to the template. |
Excellent! Would you be willing to add this note to the README of this repository under the reveal.js location?
The use of client-side source highlighters are always a little shaky when callouts are present in the source. That's because callouts are technically invalid characters in the source that the source highlighter is attempting to process. Sometimes, we get lucky and it works, as it sounds like is the case with the newer highlight.js. In general, I recommend using a server-side source highlighter (e.g., coderay or pygments) when possible. This gives us the opportunity to insert the callouts after source highlighting is complete...thus giving us 100% accuracy. Just something to note. |
Thanks for digging into this @robertpanzer! |
Sure, can do! |
Yes, it would be nice to have at least CodeRay (or one of the others like Prism or Rouge) as an option. Having said that, the CodeRay work will mostly be done in Asciidoctor core (as you can see here: https://github.com/asciidoctor/asciidoctor/blob/master/lib/asciidoctor/substitutors.rb#L1433). The template just needs to add a default highlighting theme (like the one in Asciidoctor core here: https://github.com/asciidoctor/asciidoctor/blob/master/data/stylesheets/coderay-asciidoctor.css) |
Addresses issue #65 add support for coderay & pygments
Fixed with fcf0a57 |
\o/ Thanks @robertpanzer! |
When I use the slim reveal.js template a XML listing with callouts the callout is rendered wrong.
With this example:
the callout gets rendered like this:
So
<b>
and</b>
are visible as text in the rendered HTML.This does not occur when I use the haml template. :-)
But it in this case the listing is not as pretty. :-(
The text was updated successfully, but these errors were encountered: