Inline code language

Open
#626 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
52/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
c
Domain
devtools

Research direction

Review the proposed implementation in socketry/cmark-gfm#1, then trace the inline code parsing and related API terminology in cmark. Confirm the colon syntax for language and quoted extended info, and normalize the API terminology from code fence to code info. Done means both forms are parsed as specified without whitespace before the colon.

Written by the indexing model from the issue text.

Description

I'd like to propose an extension that looks like this:

Ruby code: `Object.new`:ruby
Ruby code with extended info: `Object.new`:"ruby lineno=5"

When an inline code block is followed directly by a colon and a non-whitespace character, it gets used for the language.

In addition, some minor internal normalization to the API (don't call it code fence, rather, code info, which makes more sense).

See https://github.com/socketry/cmark-gfm/pull/1 for a proposed implementation.

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

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.

More from commonmark/cmark

All issues in commonmark/cmark

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.