Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Improve Pandoc's syntax highlighting output (Skylighting tokens and span styles are a bit too simplistic) #10114

Closed
badlydrawnrob opened this issue Aug 23, 2024 · 0 comments

Comments

@badlydrawnrob
Copy link

badlydrawnrob commented Aug 23, 2024

TL;DR: Skylighting makes some themes impossible to recreate.
The tokeniser (I think that's the right term) is more simplistic than other highlighting tools, and possibly wrong in some areas.

I've searched for similar issues but there are a lot of syntax highlighting (closed) issues! I've made some observations here about how Pandoc is outputting it's syntax highlighting for Markdown fenced code blocks, as I've been running into some roadblocks when trying to create my own colour themes.

I understand you're using Haskell's Skylighting. I'm not a Haskell guy (I've seen a couple of workarounds but I'm not a good enough programmer to understand them!

  • Are there any known issues of this sort, or future plans for improving the highlighting to get closer to Visual Studio Code's, highlight.js, or Pygments (for example) highlighting capabilities?
  • Are there any simple ways to extend Skylighting that a novice programmer could achieve? (or choose a different highlighting tool for Pandoc to use)
    • Or at least advise if one of the fixes I've mentioned above are safe to implement.

Pandoc, in general, works just fine and is easy to use and compile for my purposes, but some languages (like Elm Lang) render quite poorly, for example, .fu is applied to both functions and it's arguments, so the Breeze Dark Theme is impossible to recreate:

model-div-span-01-correct-colours model-div-span-03
Repository owner locked and limited conversation to collaborators Aug 23, 2024
@jgm jgm converted this issue into discussion #10115 Aug 23, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Projects
None yet
Development

No branches or pull requests

1 participant