Skip to content
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

Source paragraph does not honor syntax highlighter #704

Closed
gdamore opened this issue Jul 7, 2020 · 3 comments · Fixed by #720
Closed

Source paragraph does not honor syntax highlighter #704

gdamore opened this issue Jul 7, 2020 · 3 comments · Fixed by #720

Comments

@gdamore
Copy link
Collaborator

gdamore commented Jul 7, 2020

We emit the highlighter ("pygments", which is a kind of lie) on the class for listingblocks that come via a source-block, but not those coming from a source-paragraph.

This is almost certainly an oversight. (And also possibly related to #703 -- i.e. fixing #703 will probably resolve this, provided that we resolve in favor of the syntax highlighter.)

@xcoulon
Copy link
Member

xcoulon commented Jul 7, 2020

Agree with you, there are probably areas where the syntax highlighting is not supported yet 😬

From the the Chroma project page:

Chroma is based heavily on Pygments, and includes translators for Pygments lexers and styles."

So it's not totally a "lie" ;) And it provides compatibility with Asciidoctor.

@xcoulon xcoulon added this to the v0.5.0 milestone Jul 7, 2020
@gdamore
Copy link
Collaborator Author

gdamore commented Jul 7, 2020

Yeah chroma seems nice, and CSS compatible with pygments. But it's not pygments. We probably should offer an alias of chroma -- if only to give credit where it's due to the chroma author(s). (I'd argue that chroma should be the preferred name, pygments accepted as an alias, actually.)

@xcoulon
Copy link
Member

xcoulon commented Jul 7, 2020

yes, that's a fair point 👍
we should clarify this and support "chroma" as a syntax highlighter choice indeed.
I've opened #706 for that.

gdamore added a commit to gdamore/libasciidoc that referenced this issue Jul 12, 2020
This fixes three separate issues (it was natural to fix them all
at the same time).

Fixes bytesparadise#719 Should not panic on unrecognized source language
Fixes bytesparadise#706 Support "Chroma" as a syntax highlighter choice
Fixes bytesparadise#704 Source paragraph does not honor syntax highlighter
xcoulon pushed a commit that referenced this issue Jul 12, 2020
This fixes three separate issues (it was natural to fix them all
at the same time).

Fixes #719 Should not panic on unrecognized source language
Fixes #706 Support "Chroma" as a syntax highlighter choice
Fixes #704 Source paragraph does not honor syntax highlighter
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants