Element-web: Should we go back to GFM rather than CommonMark?

Created on 7 Jan 2018  路  5Comments  路  Source: vector-im/element-web

One fix to the irritating bug https://github.com/vector-im/riot-web/issues/4674 is to go back to GFM from CommonMark. This bug exists to track the comparison i'm building up between them:

https://docs.google.com/spreadsheets/d/1pXWhED9CPtQTnQ5QGrCFSXuSi1yyHV9Gd-dNFIUVXIs/edit#gid=0

It follows on from the conversation at https://github.com/vector-im/riot-web/issues/4809#issuecomment-355158896

feature major composer uux

Most helpful comment

I'd like to bump this issue because CommonMark has no support for strikethrough which I consider a very useful tool that is unavailable at the moment. Has there been any movement in this discussion internally or is the idea mostly dead by now?

All 5 comments

Ironically, github have been maintaining the GFM spec and reference implementation as a diff against cmark (the C ref impl of commonmark): https://github.com/commonmark/cmark/compare/master...github:master (thanks to @maxgrenderjones to pointing it out). So one solution could be to 'just' port the same patches commonmark.js, and then we end up with best of both worlds?

See also https://github.com/vector-im/riot-web/issues/5674

CommonMark spec seems to allow code fences interrupting a paragraph (unlike GFM), but the actual reference implementation seems to have the GFM behaviour.

I'd like to bump this issue because CommonMark has no support for strikethrough which I consider a very useful tool that is unavailable at the moment. Has there been any movement in this discussion internally or is the idea mostly dead by now?

@ara4n Could we just return to Marked in Riot Web, or would we really want the C reference impl of GFM? The 2017 PR to move to CommonMark (https://github.com/matrix-org/matrix-react-sdk/pull/575) only says that "Marked has some annoying bugs", so it's not clear to me what those were / how annoying they were / if they still exist.

CommonMark is missing so many simple but incredibly useful things. Please switch to GFM

Was this page helpful?
0 / 5 - 0 ratings