-
Notifications
You must be signed in to change notification settings - Fork 396
Open
Description
Pandoc 3.8 introduced a new --syntax-highlighting option that replaces the deprecated --highlighting-style. The defaults file field also changed from highlight-style to syntax-highlighting.
While Quarto's current highlight-style field still works (Pandoc accepts it for backwards compatibility), we should migrate to align with Pandoc's direction.
Proposed Changes
- Rename constant
kHighlightStyletokSyntaxHighlighting - Change value from
"highlight-style"to"syntax-highlighting" - Update all usages across the codebase
- Remove
nullfrom the type definition (use"none"string instead)
Files Affected
src/config/constants.tssrc/config/types.tssrc/command/render/pandoc.tssrc/quarto-core/text-highlighting.tssrc/preview/preview-text.ts
Benefits
- Aligns with Pandoc 3.8+ direction
- Avoids deprecation warnings
- Cleaner code (no null handling)
Follow-up
Documentation update needed for quarto-web syntax highlighting docs (docs/output-formats/_document-options-syntax-highlighting.md) to note Pandoc 3.8 accepts: none, default, idiomatic, style name, or path.
References
- Pandoc changelog:
--syntax-highlightingacceptsnone,default,idiomatic, style name, or path - The
nullto"none"fix forhighlight-style: noneis handled in PR [deps] Pandoc 3.8.3, typst 0.14.2 #13249
gordonwoodhull