commonmark / commonmark/cmark

Feature: Rendering hooks

Open
#349 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
2k
Forks
691
Avg merge
1d 16h
Merged PRs (30d)
1

Description

GoldMark has a nice feature: you can define your own renderers for specific items, such as links and headings.

See e.g. how Hugo uses this: https://gist.github.com/killbus/f47efbd13d96b437b9d218334508bffb

It would be nice if cmark could do something similar.

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

Read the linked GoldMark and Hugo example, then inspect cmark's current rendering implementation to identify a suitable extension point. Done means callers can provide custom renderers for specific items such as links and headings, with the behavior documented and covered by tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
api
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.