rust-lang / rust-lang/mdBook

Better syntax highlighting support - consider switchting from HighlightJS to Prism

Open
#2,313 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-Highlighting C-enhancement
Dominant language
Rust
Stars
22.2k
Forks
1.9k
PR merge metrics
PR metrics pending

Description

Problem

The current highlighter (powered by highlight.ts) does not support .tsx.

Proposed Solution

Switch to Prism

Notes

Some related discussions:

https://github.com/highlightjs/highlight.js/issues/3625

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no files or tests. Start by locating the current highlighter powered by highlight.ts and reviewing the linked HighlightJS discussion, then assess how Prism could provide .tsx support. Done means the highlighter switch is implemented and .tsx syntax highlighting works without breaking existing supported languages.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.