Skip to content

Conversation

@cderv
Copy link
Collaborator

@cderv cderv commented May 14, 2025

format:
  html:
    highlight-style:
        light: pygments
        dark: kate

Doing the above should work. We allow this in our schema

- name: highlight-style
tags:
formats: [$html-all, docx, ms, $pdf-all]
schema:
anyOf:
- object:
closed: true
properties:
light: path
dark: path

But it was not working because such an object was only resolved for the user-provided theme. It was not at all correctly handled for the bundled ones.

This PR solves this. It is really more an oversight and so a regression that goes as far as version 1.3, I think.

So let's consider this a missing feature instead and only fix for 1.8. But this also easy enough to backport in 1.7 as it is a variable name change).

@posit-snyk-bot
Copy link
Collaborator

posit-snyk-bot commented May 14, 2025

🎉 Snyk checks have passed. No issues have been found so far.

security/snyk check is complete. No issues have been found. (View Details)

license/snyk check is complete. No issues have been found. (View Details)

@cscheid
Copy link
Collaborator

cscheid commented May 14, 2025

Looks good! Should we have an entry on the changelog or docs?

[skip ci]
@cderv cderv merged commit 26a0966 into main May 14, 2025
2 checks passed
@cderv cderv deleted the syntax-highlight-dark-light branch May 14, 2025 16:55
@xx02al
Copy link

xx02al commented May 24, 2025

Great, this is what I was wishing for in discussion #12422.

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.

5 participants