PrismJS / PrismJS/prism

Keep Markup and Command Line plugins confuse preserved markup and tokens

Open
#3,568 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Information:

Prism version: PrismJS 1.29.0
Plugins: https://prismjs.com/download.html#themes=prism&languages=markup+css+clike+javascript+bash&plugins=line-numbers+keep-markup+command-line+unescaped-markup+normalize-whitespace+match-braces+treeview
Environment: browser
Description
The preserved html tag is missplaced when multiple plugins interract and text rearrangements take place.

Example
https://codepen.io/windymindy/pen/XWqBaBX reproduces the bug
https://codepen.io/windymindy/pen/RwyBZYQ works just fine

related: https://github.com/PrismJS/prism/issues/2645

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 reproducing the behavior in the two linked CodePen examples with the listed keep-markup, command-line, and related plugins enabled. Inspect how those plugins handle preserved HTML tags and text rearrangement, using issue 2645 for context. Done means preserved markup remains in the correct position when the plugin interactions are combined, without breaking the working example.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.