-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
GitHub Flavored Markdown Compliance #1211
Comments
I've been working on GFM tables compliance. It seems that it's currently impossible because of PR#221. Marked has decided to violate the GFM spec in the hope that GFM would catch up. AFAICT this is not going to happen. The particular point at issue is how table cells are aligned. Using attributes or inline styles? Attribute (per GFM)
Inline Style (Marked behavior)
I can see only a few ways forward.
Did I miss anything? Who can make this decision? |
My vote is for spec compliance Anyone who needs the alignment in css can do: let html = marked(md, {gfm: true});
html = html.replace(/<(td|th) align="/g, '<$1 style="text-align:'); |
Agree with @UziTech. Think the style use was an override of spec-compliance. So, abandon decision made in #221...didn't even know that was a decision that was made. @tomtheisen: To your other question, as a publisher I tend to set the priority (with ample feedback from everyone esle). We've decided, for now, to prioritize security then spec-compliance; so, chances are if there's a debate that can be argued from the spec, the spec will win. |
ps. Thanks to @tomtheisen, thanks for the continued contributions. |
I agree with GFM spec compliance 👍 As long as we release this as a breaking change so we make users aware 🥂 |
I created a PR for GFM table compliance. I don't really know what I'm doing in marked, so feedback is welcome. |
Marked version: 0.3.19
Markdown flavor: GitHub Flavored Markdown (GFM)
Proposal type: other
What pain point are you perceiving?
See #1202 only focused on the GFM.
What solution are you suggesting?
PR #1210 looks to run Marked against the GFM extension test cases: no file generated
So far the results show that we are roughly 56% spec-compliant.
The spec is divided into sections and each section has a number of test cases. (Counts may be off and are meant to represent estimate percent compliance with each section.)
The text was updated successfully, but these errors were encountered: