Skip to content

Pandoc's span classes (tokens) are too simplistic #152

@badlydrawnrob

Description

@badlydrawnrob

For example, .fu class styles a lot more elements than a token in Visual Studio Code does.

  • This makes it incredibly difficult (impossible) to recreate someone's theme with Pandoc's Skylighting.
  • We're using Breeze Dark Theme plugin for Visual Studio Code as an example.
  • I've logged an issue with Pandoc and it seems like something I might be able to change myself

The below issues are some of the problems we have to face creating a nice syntax highlighting theme, or modifying one. It's by no means exhaustive, but in an ideal world, these issues would be fixed!

Some things are impossible

Different colours for functions() and function(arguments) are not possible

model-div-span-01-correct-colours model-div-span-02 model-div-span-03

Coloured brackets are not possible

coloured-brackets-are-impossible-01 coloured-brackets-are-impossible-02

.op (Operator class) is not nuanced enough (compared with VSC)

operator-class-00 operator-class-01 operator-class-02

Some things feel wrong?

.dv (Decimal Value) used for CSS values. Doesn't seem right?

decimal-value-for-css-values-for-fuck-sake

Some things are difficult

Comments are not differentiated in Pandoc?

comments-aren't-differentiated-as-much?-01 comments-aren't-differentiated-as-much?-02

.dt are shared across different language types, meaning you've got to take care making decisions about color.

ugh-is-also-a- dt(datatype)-02 ugh-is-also-a- dt(datatype)-so-hard-to-change

Footnotes

  1. We've already travelled this road before. Trying to hack javascript to make highlight.js work, exploring Pygments or add-ons to extend our flashcards, and lots of other little problems that make our life more complicated. Pandoc is the easiest of the bunch, but comes with tradeoffs.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions