commonmark / commonmark/commonmark-java
How to preserve spaces in GFM tables?
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 2.7k
- Forks
- 336
- PR merge metrics
- No merged PRs in 30d
Description
Hello,
in my project there are many table of the form
| A |B|
|---|-|
| 1 |2|
When I use the GFM table extension they are correctly parsed, but all spaces are removed and that make editing the table impossible afterwards. Is there a way to prevent this condensation of the existing spaces?
Contributor guide
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 with the GFM table extension and trace how table cells are parsed and rendered, focusing on where surrounding spaces are condensed. Check the existing table-related tests to determine whether whitespace preservation is supported; done means either identifying the available option or defining and testing the requested behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100