Issue with rendering whitespace to commonmark
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 2k
- Forks
- 691
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 1
Description
There is an issue with cmark_render_commonmark function when it gets as an input a document that has a text node with a whitespace in the beginning, it does not return a correct markdown string.
For example, the following document:
Document node -> Paragraph node -> Text node with text literal
is rendered as text\n, which is a code block.
From looking at some other implementation I see the whitespace is replaced with  . Can this applied in cmark? thanks
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the cmark_render_commonmark function and reproduce the issue with a paragraph containing a text node beginning with four spaces. Trace how leading whitespace is rendered, then verify that the resulting CommonMark no longer becomes a code block and preserves the intended text representation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100