PrismJS / PrismJS/prism

Pattern generators

Open
#1,495 1 comment 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

This is based on the idea of @LeaVerou (#1479 (comment))

We could also have factory helpers, e.g. Prism.keywords("foo", "bar", ...) that generate regexes for common things

The only difference is that Prism.keywords will not generate a regex but an array with a method/property generate. This method will be called when the pattern is used for the first time and returns a regex.
Like this, we can have lists of keywords which can be used and modified by other languages.

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 with the proposal in the #1479 comment and the issue description; no implementation files or tests are named. Clarify the Prism.keywords API, when generate runs, and how other languages may modify keyword lists. Done means the scope and expected behavior are agreed and implemented.

Written by the indexing model from the issue text.

Assessment

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