-
Notifications
You must be signed in to change notification settings - Fork 404
Support for new --syntax-highlighting and new idiomatic value
#13984
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
Open
cderv
wants to merge
8
commits into
main
Choose a base branch
from
fix/issue-13878
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+631
−71
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Collaborator
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
7eb5359 to
12ec666
Compare
Pandoc 3.8 introduced --syntax-highlighting to replace --highlight-style. This adds the new option to Quarto with support for: - Style names (tango, github, etc.) for Pandoc skylighting - Custom .theme files for KDE syntax themes - "none" to disable highlighting - "idiomatic" for native format highlighting (typst, LaTeX listings, reveal.js) The deprecated highlight-style option remains supported but is hidden from autocomplete. Typst format now supports all syntax highlighting options including syntax-definitions for custom language definitions. Fixes #13878 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Update to use --syntax-highlighting for Pandoc 3.8 compatibility.
Since 1edf415, highlight-style: none sets "none" string instead of null. The ?? operator and null check didn't catch this, causing hasTextHighlighting to incorrectly return true when highlighting was disabled. - Use || fallback (consistent with hasAdaptiveTheme, readHighlightingTheme) - Check for "none" string instead of null - Remove unreachable null check (|| chain always provides default) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Consolidate repeated theme resolution logic into a single exported function. Three functions now use this helper instead of duplicating the fallback chain. - Add getHighlightTheme() with syntax-highlighting > highlight-style > default - Simplify readHighlightingTheme, hasAdaptiveTheme, hasTextHighlighting - Add 4 unit tests for getHighlightTheme (18 total) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Reveal.js doesn't properly support Pandoc's idiomatic highlighting mode, resulting in no highlighting at all. Emit a warning and fall back to default skylighting instead. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
a5380b4 to
970b0c6
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pandoc 3.8 introduced
--syntax-highlightingto replace--highlight-style.This adds the new option to Quarto with support for:
The deprecated
highlight-styleoption remains supported but is hiddenfrom autocomplete. Typst format now supports all syntax highlighting
options including
syntax-definitionsfor custom language definitions.Format Support for
idiomaticreveal.js limitation
Pandoc's reveal.js writer doesn't properly produce highlight.js output when
idiomaticis used - it results in no highlighting at all. Quarto now detectsthis and emits a warning while falling back to default skylighting.
See #13989 for tracking the reveal.js idiomatic support.
Tests
Smoke-all tests added for:
tests/docs/smoke-all/typst/syntax-highlighting/(5 tests)tests/docs/smoke-all/latex/syntax-highlighting/idiomatic.qmdtests/docs/smoke-all/revealjs/syntax-highlighting/idiomatic-warning.qmdFixes #13878