commonmark / commonmark/commonmark.js

How To Fork and Implement Highlighter / Hilite

Open
#257 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
1.6k
Forks
231
Avg merge
2d 11h
Merged PRs (30d)
3

Description

It's now becoming common to see the double equal sign around something in many variations of Markdown to indicate a highlighted section, such as:

You should ==always remember this==.

And that would display with <mark> wraparound on that, meaning often a yellow highlighter background color unless overridden by CSS.

It would be nice if CommonMark would implement a plugin system where this could be added, as well as a way to protect this from impacting any <code> or <pre> blocks that were set up with backticks.

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.

Research direction

Start by reviewing the CommonMark parser and renderer entry points to understand how emphasis-like syntax and fenced code blocks are handled. Define the plugin-system scope and the expected behavior for ==highlighted text==, including protection of code and pre blocks, before identifying appropriate tests.

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.