-
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
resolves #261 use the new syntax highlighter API #287
resolves #261 use the new syntax highlighter API #287
Conversation
Agreed. Please drop the legacy syntax highlighting support from this PR. |
Otherwise the generated files are suffixed with .revealjs when using bundle exec rake examples:convert
5cbb4f0
to
43ef818
Compare
43ef818
to
464263e
Compare
Is it possible that |
It's somehow working on Asciidoctor:
I think the reason is that we are using Ubuntu xenial (with Python 3 I assume) and Asciidoctor is using Ubuntu trusty (with Python 2). If it's only failing in JRuby, I guess we could add a condition in the Gemfile: group :development do
gem 'pygments.rb' unless RUBY_ENGINE == 'jruby'
gem 'rouge'
end Or just remove the dependency on Pygments?
|
I don't want to get rid of it since it does seem to work with MRI but I don't want it to make Travis fail since it's in bad shape (but that could be fixed by upstream eventually).
If disabling doctest per engine is easy let's do that. Otherwise disabling all |
@obilodeau I've added the |
Fair enough 😄 |
This new API was introduced in Asciidoctor 2.0.0.
If the
syntax_highlighter
method is not available fallback to the "legacy" syntax highlighting.When using the new syntax highlighting API, code blocks are encapsulated in a
<div class="listingblock">
and<div class="content">
. I think it might be possible to remove them using the "transform" option on thepre
andcode
elements to add the missing classes/attributes.Not sure if the "noescape" data attribute is mandatory or not but when the syntax highlighter is "highlight.js", the code element will have the following attribute
data-noescape="true"
.I think we should release a version 3.0.0 where we break compatibility with Asciidoctor < 2.0.0 because: