CommonMark compatibility (Tracker bug)
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 659
- Forks
- 133
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 110
Description
Background
Currently there are "commonmark" tests, but they only test markdown-it to output correct HTML for markdown (which is already tested upstream), but they are not testing our pipeline to keep the markdown valid.
Meaning validating that the input and output are at least equivalent (both result in same HTML, as the mapping is surjective but not injective).
md ==> markdown-it ==> HTML ==> TipTap ==> prosemirror-markdown ==> md
Problems
I created a branch with adjusted tests, currently there are a lot of failures, which need to be triaged (real bugs, whitespace problems, test issues...), so this is a list of all bugs blocking full CommonMark support:
- 🐞 https://github.com/nextcloud/text/issues/2699
- 🐞 Multiple (allowed) (white)spaces are removed, #2720
- 🐞 https://github.com/nextcloud/text/issues/2703
- 🆙 ⏲️ https://github.com/ProseMirror/prosemirror-markdown/issues/78 (waiting for release)
- 🆙 https://github.com/ProseMirror/prosemirror-markdown/issues/77
- 🆙 https://github.com/nextcloud/text/issues/969 (Waiting for release of https://github.com/ProseMirror/prosemirror-markdown/issues/76 )
- 🆙 https://github.com/ProseMirror/prosemirror-markdown/issues/88 (we need to upgrade to
prosemirror-markdown >= 1.10.1) - 🆙 https://github.com/ProseMirror/prosemirror-markdown/issues/82
- ➕ https://github.com/nextcloud/text/issues/2170 (HTML is required for full CommonMark support)
Opinions
There are already issues about breaking the formatting of markdown files, like https://github.com/nextcloud/text/issues/593 and https://github.com/nextcloud/text/issues/2577 but from my point of view it is hard to provide that kind of compatibility, at least the way text is build.
But I do not think it is needed, if I need a markdown editor with that behavior, I would recommend to use https://github.com/icewind1991/files_markdown
Of cause you as the developers of this app should decide the scope of application, but for me text is a collaborative text editor.
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 existing CommonMark tests and the adjusted test branch described in the issue, then triage the failures across the markdown-it, HTML, TipTap, prosemirror-markdown, and markdown pipeline. Review the unresolved linked issues, distinguish real bugs from whitespace or test problems, and consider the work complete when the remaining CommonMark compatibility failures are resolved or clearly scoped.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, markdown
- Domain
- content, frontend
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100