Skip to content

[reveal.js] syntax-highlighting: idiomatic produces no highlighting #13989

@cderv

Description

@cderv

Setting syntax-highlighting: idiomatic with reveal.js format produces no syntax highlighting at all - code blocks render as plain text without any highlighting spans.

Expected

When using syntax-highlighting: idiomatic, reveal.js should use its native highlight.js plugin for syntax highlighting.

Actual

Code blocks render as raw text with no <span> elements or CSS classes for highlighting.

<!-- Expected (highlight.js or skylighting) -->
<span class="kw">def</span> hello():
    <span class="bu">print</span>(<span class="st">"Hello"</span>)

<!-- Actual (no highlighting) -->
def hello():
    print("Hello")

Current Workaround

PR #13984 blocks idiomatic for reveal.js with a warning and falls back to default skylighting:

WARNING: syntax-highlighting: idiomatic is not supported for reveal.js. Using default highlighting.

Root Cause

This appears to be a Pandoc-side issue where the reveal.js writer doesn't fully implement idiomatic highlighting mode. The idiomatic value passes through to Pandoc correctly, but the output doesn't activate highlight.js.

Possible Solutions

  1. Investigate Pandoc's reveal.js writer to understand why highlight.js isn't activated
  2. Add Quarto-side integration to enable highlight.js plugin when idiomatic is requested
  3. Support highlightjs-theme variable for theme customization

References

Metadata

Metadata

Assignees

Labels

pandocrevealjsIssues with the revealjs format

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions