Comments (13)
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?
from asciidoctor-backends.
I'll try my best! :)
Can take some time though.
from asciidoctor-backends.
We'll be here to help! @obilodeau might be able to pitch in as well, but the more hackers, the merrier!
from asciidoctor-backends.
Well, it's rather the other way around at first look.
The haml template has no logic for that, but the slim template takes special care of it.
from asciidoctor-backends.
Check the deck.js backend. I know that it has support for such things...and a very similar output is needed.
from asciidoctor-backends.
Does not seem to be a problem in the templates.
With this example:
[source]
----
<xml> <!--1-->
----
the result in the HTML file is <div class="listingblock"><div class="content"><pre class="highlight"><code><xml> <b>(1)</b>
which is correct.
But when I open the file in the browser the content flickers and opening the DOM shows this:
<div class="listing block">
<div class="content">
<pre class="highlight">
<code class="apache">
<span class="tag"><xml></span>
<span class="tag"><b></span>(1)<span class="tag"></b></span>
...
When I remove the source name from the block the error does not occur anymore, that is the <b>
and </b>
disappear and the number is rendered bold like it should be.
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!
from asciidoctor-backends.
Closing as the issue is not related to the template.
Instead reveal.js should update its version of highlight.js if possible.
from asciidoctor-backends.
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!
Excellent! Would you be willing to add this note to the README of this repository under the reveal.js location?
when I open the file in the browser the content flickers and opening the DOM shows this:
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.
from asciidoctor-backends.
Thanks for digging into this @robertpanzer!
from asciidoctor-backends.
Sure, can do!
Would it be worth trying to enable Coderay in the templates?
Because as far as I could see loading highlight.js is currently burnt in.
from asciidoctor-backends.
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)
from asciidoctor-backends.
Fixed with fcf0a57
Added note for highlight.js to README.
Added support for using coderay and pygments as source-highlighters.
from asciidoctor-backends.
\o/
Thanks @robertpanzer!
from asciidoctor-backends.
Related Issues (20)
- Invoking latex converter from elsewhere HOT 4
- Align chart extension with AsciiDoc conventions HOT 3
- Graduate the LaTeX backend to its own repository HOT 16
- README - populate "General Usage Instructions"
- Support for deckjs being in a different relative location HOT 2
- Include attribute to add third party javascript HOT 3
- No tags for the different releases HOT 2
- Support [%step] for source code HOT 2
- Only treat level-1 headings as sections in deck.js backend HOT 2
- Trim the ERB backend down to a handful of examples HOT 2
- Admonitions (TIP, NOTE...) are rendered in deck.js only as text, and without space HOT 1
- Is it there a backend that outputs to pure text? HOT 5
- Support new SVG embedding options HOT 1
- Should we deprecate this repository ? HOT 12
- if IE tag in Meta does not work since ie10 HOT 2
- DEFAULT_TOCLEVELS seems to be gone in recent Asciidoctor implementations HOT 1
- Problem: reveal.js backend wont generate Title slide HOT 6
- Problem: reveal.js backend wont apply themes from atttribute revealjs_theme HOT 4
- New backend for Remark HOT 4
- Enable Travis in this repo HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from asciidoctor-backends.