Prismjs plugins/line highlighting

Open
#87 9 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
react, typescript
Domain
frontend

Research direction

Start by reviewing react-live's existing PrismJS integration and the linked PrismJS issue about DOM-dependent plugins. Clarify the desired line-highlighting behavior and its server-rendering constraints, then define acceptance criteria and tests for highlighted lines before implementation.

Written by the indexing model from the issue text.

Description

enhancement

Because react-live relies on the Node version of prismjs, it's unable to use many prism plugins which rely on the DOM. As discussed over on their repo, there aren't definite plans to fix this: https://github.com/PrismJS/prism/issues/1171

It makes definite sense to use the node package, especially for server rendering.

At the same time I feel react-live is sorely missing some features, particularly line highlighting - being able to highlight lines can really helpful when presenting an evolving piece of code.

Wondering if any thought has gone into remedying this.

Dominant language
TypeScript
Stars
4.6k
Forks
260
PR merge metrics
No merged PRs in 30d

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.

More from FormidableLabs/react-live

All issues in FormidableLabs/react-live

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.