Skip to content

fix(markdown): drop deprecated --highlight-style - #53

Open
sxl613 wants to merge 1 commit into
doomemacs:mainfrom
sxl613:fix-pandoc-deprecation-warning-in-preview
Open

fix(markdown): drop deprecated --highlight-style#53
sxl613 wants to merge 1 commit into
doomemacs:mainfrom
sxl613:fix-pandoc-deprecation-warning-in-preview

Conversation

@sxl613

@sxl613 sxl613 commented Aug 2, 2026

Copy link
Copy Markdown

pandoc 3.8 deprecated --highlight-style in favour of --syntax-highlighting, so newer pandoc prints:

Deprecated: --highlight-style. Use --syntax-highlighting instead.

+markdown-compile-pandoc passes a plain buffer as call-process-region's BUFFER argument, which merges stderr into stdout, so this warning is injected into the rendered HTML instead of being discarded. Seen with pandoc 3.10.1 via markdown-preview.

Rather than gate the flag on pandoc <3.8 vs >=3.8, drop it altogether: pygments is already pandoc's default style, so output is unchanged and the command still works on every pandoc version.

Ref: https://github.com/jgm/pandoc/releases/tag/3.8
specifically

  • Add a new command line option --syntax-highlighting; this takes
    the values none, default, idiomatic, a style name, or a path to a
    theme file. It replaces the --no-highlighting, --highlighting-style,
    and --listings options, which will still work but with a deprecation
    warning. (Albert Krewinkel)

  • I searched the issue tracker and this hasn't been PRed before.
  • My changes are not on the do-not-PR list for this project.
  • My commits conform to Doom's git conventions.
  • I am blindly checking these off.
  • This PR contains AI-generated work.
  • Any relevant issues or PRs have been linked to.
  • This a draft PR; I need more time to finish it.

pandoc 3.8 deprecated --highlight-style in favour of
--syntax-highlighting, so newer pandoc prints:

  Deprecated: --highlight-style. Use --syntax-highlighting instead.

+markdown-compile-pandoc passes a plain buffer as call-process-region's
BUFFER argument, which merges stderr into stdout, so this warning is
injected into the rendered HTML instead of being discarded. Seen with
pandoc 3.10.1 via markdown-preview.

Rather than gate the flag on pandoc <3.8 vs >=3.8, drop it altogether:
pygments is already pandoc's default style, so output is unchanged and
the command still works on every pandoc version.

Ref: https://github.com/jgm/pandoc/releases/tag/3.8
@hlissner hlissner added this to the v26.08 milestone Aug 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants