Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Add a commonmark option #129

Closed
a-ignatov-parc opened this issue Dec 18, 2017 · 7 comments
Closed

Feature request: Add a commonmark option #129

a-ignatov-parc opened this issue Dec 18, 2017 · 7 comments

Comments

@a-ignatov-parc
Copy link

a-ignatov-parc commented Dec 18, 2017

It seams that react-markdown staring from 3.0.0 isn't commonmark compliant any more because commonmark option is disabled by default in remark-parse. It's more breaking than public api changes and there is no notes about it. This was done on purpose?

@rexxars
Copy link
Collaborator

rexxars commented Dec 18, 2017

Yes. I got so many requests for tables and other non-commonmark features that I decided to switch. I could enable the commonmark option, but I'd have to make sure documentation clearly stated that certain features simply won't work in that mode.

@a-ignatov-parc
Copy link
Author

a-ignatov-parc commented Dec 18, 2017

I understand. And want to clarify that Commonmark spec allows adding any extensions we want (like tables). It's main goal is to make parsing more deterministic by strict syntax.

There is even list with proposed extensions.

Also github made there flavors upon commonmark spec. So I think it's a good idea to continue using commonmark ;)

@a-ignatov-parc
Copy link
Author

At least we should have ability to pass commonmark option to remark-parse. I'd say it should be turned on by default but that would breaking change to v3 and backward compatible to v2 🤔

@rexxars
Copy link
Collaborator

rexxars commented Dec 18, 2017

I'd be open for adding the option. I don't want to enable it by default - I think that will lead to more support issues rather than less (though I appreciate a stricter format on a personal level).

@rexxars rexxars changed the title Why remark-parse used without commonmark option? Add a commonmark option Dec 18, 2017
@a-ignatov-parc
Copy link
Author

Not going to argue 👍

But please mention in Readme that react-markdown@3 isn't commonmark compliant by default. This could be a big surprise for v2 users.

@a-ignatov-parc
Copy link
Author

Also it would be good to point that remark-parse has some inconsistency with commonmark spec.

@rexxars rexxars changed the title Add a commonmark option Feature request: Add a commonmark option May 8, 2018
@rexxars
Copy link
Collaborator

rexxars commented Jun 24, 2019

This is now (kind of) possible by using the parserOptions feature in v4.1.0:

<ReactMarkdown source="# yer markdown" parserOptions={{commonmark: true}} />

@rexxars rexxars closed this as completed Jun 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants