Skip to content

Conversation

@cderv
Copy link
Collaborator

@cderv cderv commented Apr 8, 2025

Fix CSS rule for token keywords needs to be inserted after generic rules

Otherwise, CSS specificity will not work as expected. This is how it is done on the Pandoc side, which we are mimicking here.

fixes #11911

  • Add tests

Later on for 1.8, we could rewrite all this part to closely match what Pandoc is doing in Haskell for our typescript processing creating SCSS rules instead of CSS. But this would require testing all themes I guess

@cderv cderv force-pushed the theme/css-highlight branch from 8aa0a5b to d33489c Compare April 9, 2025 14:18
@cderv cderv marked this pull request as ready for review April 9, 2025 14:18
@cderv cderv force-pushed the theme/css-highlight branch from d33489c to 020fe26 Compare April 9, 2025 14:30
cderv added 5 commits April 9, 2025 16:30
Otherwise CSS specificity will not work as expected, and this is how it is done on Pandoc side which we are mimicking here.
add missing theme and order alphabetically
- Start by testing codeBlock vs InlineCode highlighting, using Keyword token as this is the common one in all theme
@cderv cderv force-pushed the theme/css-highlight branch from 020fe26 to cf416b7 Compare April 9, 2025 14:31
@cderv cderv merged commit 7d45e02 into main Apr 9, 2025
49 checks passed
@cderv cderv deleted the theme/css-highlight branch April 9, 2025 18:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Inconsistent highlighting between code block and inline code

2 participants