PrismJS / PrismJS/prism

Highlighting parts of code

Open
#496 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement plugins
Dominant language
JavaScript
Stars
13k
Forks
1.4k
Avg merge
15h 36m
Merged PRs (30d)
3

Description

Often in tutorials one wants to only highlight the part of code that changed from the previous snippet.
We could introduce a microsyntax for that (like **text**) and wrap it in <mark> elements that the author could then style (we could include some rudimentary styling).

This will be a fun plugin to write, and I’d love to write it myself at some point. Thoughts?

Contributor guide

No contributing guide indexed for this repository

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

Start by reviewing Prism's plugin architecture and the existing code-highlighting flow to determine where a markup microsyntax could be parsed. Define the syntax, escaping behavior, generated elements, styling expectations, and tests needed to demonstrate that highlighted changes render correctly.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
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.