PrismJS / PrismJS/prism

Previewers' new tokens should have language specific insides

Open
#1,698 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

I noticed that the new tokens Previewers adds to supported languages have a fixed inside (if any).

This means that the presence of the Previewers plugin can change the way code is highlighted because the Previewers' tokens can match the same (or more) as (than) the tokens of the extended language.
I.e. CSS rgb(0, 0, 0) will be matched as a color token with inside function and punctuation while CSS also matches numbers (with CSS extras) and commas.

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 tracing how the Previewers plugin defines tokens for supported languages, then reproduce the CSS rgb(0, 0, 0) example and compare its matches with CSS extras. Done means Previewers tokens use language-specific inside definitions without changing the extended language's highlighting.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.