PrismJS / PrismJS/prism

Use Regex Optimizer

Open
#2,397 12 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Motivation
Since I contributed the NSIS component in 2014, its RegEx patterns have been optimized by other contributors. I'm not entirely sure about the motivation for these (better performance? smaller code?), but either way, these optimizations make it harder to maintain the component. For the most part, I continued adding new syntax, but over the time my motivation continually decreased.

Description
Libraries such as regexp-tree provide an API to optimize patterns. I wonder whether you have considered using this (or similar libraries) to create optimized builds for language components. The result would be a codebase that is both, maintainable and optimized (for whatever reason, see above).

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

Review how Prism language components are currently maintained and built, then examine the regexp-tree API proposed in the issue. Determine whether an optimizer can preserve maintainable patterns while producing optimized builds; done means a documented, agreed approach with optimized output and no manual optimization burden.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
build-system, 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.