Giter Club home page Giter Club logo

Comments (14)

mojavelinux avatar mojavelinux commented on June 7, 2024

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.

mraible avatar mraible commented on June 7, 2024

@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.

Screen Shot 2019-10-28 at 4 07 44 PM

Here's what it looks like before switching.

image

from infoq-mini-book.

mojavelinux avatar mojavelinux commented on June 7, 2024

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.

mraible avatar mraible commented on June 7, 2024

@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.

mojavelinux avatar mojavelinux commented on June 7, 2024

You'd need the same upgrade either way.

from infoq-mini-book.

robertpanzer avatar robertpanzer commented on June 7, 2024

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.

mojavelinux avatar mojavelinux commented on June 7, 2024

Not sure I fully understand what a development dependency is

A development dependency is a test suite dependency.

from infoq-mini-book.

robertpanzer avatar robertpanzer commented on June 7, 2024

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.

mojavelinux avatar mojavelinux commented on June 7, 2024

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.

mojavelinux avatar mojavelinux commented on June 7, 2024

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.

robertpanzer avatar robertpanzer commented on June 7, 2024

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.

mojavelinux avatar mojavelinux commented on June 7, 2024

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.

robertpanzer avatar robertpanzer commented on June 7, 2024

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:
Bildschirmfoto 2019-11-03 um 08 58 00

from infoq-mini-book.

robertpanzer avatar robertpanzer commented on June 7, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.