Comments (14)
This will require switching to AsciidoctorJ 2, since that's what provides Rouge for the HTML conversion. But we could start by switching the PDF build.
from infoq-mini-book.
@mojavelinux I have this HTML block that renders funny after the change.
[source,html]
.src/app/search/search.component.html
----
<form>
<input type="search" name="query" [(ngModel)]="query" (keyup.enter)="search()">
<button type="button" (click)="search()">Search</button>
</form>
----
It's Angular HTML, but the highlights are off.
Here's what it looks like before switching.
from infoq-mini-book.
That's an indication the rouge gem is out of date. Support for Angular was fixed in a recent version (specifically 3.7.0). AsciidoctorJ PDF needs to upgrade in the next release (which is due out soon). See https://github.com/asciidoctor/asciidoctorj-pdf/blob/master/build.gradle#L51
from infoq-mini-book.
@mojavelinux I created a PR to upgrade the gem. However, I'm not sure that'll fix the problem since the example above is in the rendered HTML, not PDF.
from infoq-mini-book.
You'd need the same upgrade either way.
from infoq-mini-book.
My bad, when upgrading to new versions I only checked for upgrades in the runtime deps, not the development deps. (Not sure I fully understand what a development dependency is)
I am planning to make a release of asciidoctorj this weekend which should include rouge 3.12.0.
I’ll test how this looks like before doing that release.
from infoq-mini-book.
Not sure I fully understand what a development dependency is
A development dependency is a test suite dependency.
from infoq-mini-book.
Yes, that was what I was thinking as well.
But it’s also an optional runtime dependency, isn’t it?
Just wanted to say sorry, it’s my bad that I completely skipped the dev dependency section on rubygems.org when checking for upgrades of transitive deps.
from infoq-mini-book.
But it’s also an optional runtime dependency, isn’t it?
Yes, those that's only suggested by the docs. In other words, the integration only works if the gem is present.
from infoq-mini-book.
Where you should be looking is not on rubygems.org, but rather here: https://github.com/asciidoctor/asciidoctor-pdf/blob/master/Gemfile
from infoq-mini-book.
I'll make a release of asciidoctorj-pdf 1.5.0-beta.7.1 that contains an updated version of rouge.
Relying on the current version in asciidoctorj will not be enough since users of asciidoctorj-pdf might still work with asciidoctorj 1.5.x or 1.6.x.
from infoq-mini-book.
I would recommend waiting for 1.5.0.rc.1 (or, if things go sideways, beta.8), which should be out later this week.
from infoq-mini-book.
OK, then I'll wait. I'll create a PR though to update rouge to the latest 3.12.0 also in asciidoctor-pdf and to add chunky_png, which I was also missing as I have just seen.
The pdf output of of the angular snippet will look like this with 3.12.0, I guess this is ok:
from infoq-mini-book.
add chunky_png, which I was also missing as I have just seen
If I look at the Gemfile it's not there, so I am not going to add it.
from infoq-mini-book.
Related Issues (18)
- Download Kindlegen automatically as part of the build HOT 1
- Unable to generate PDF HOT 5
- Tags in XML files not working HOT 4
- npm build scirpt only works on Bash shell HOT 1
- How to define "parts" for the PDF? HOT 2
- License for this repo HOT 1
- All chapters titles are the book titles in the epub file HOT 2
- No cross reference links in generated pdf file HOT 10
- Cross reference links not working for html HOT 1
- Add ability to link to downloads HOT 7
- Question: how to run this project in Windows HOT 13
- Which version of Ruby to use? HOT 9
- Figure and listing numbers not consistent between formats HOT 11
- Update to match JHipster Book 2.0 with Gulp
- Minor release issue HOT 3
- Building & releasing multiple books HOT 5
- Don't hardcode env var KINDLEGEN in build.sh HOT 2
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 infoq-mini-book.