Marked version: 0.3.19
Markdown flavor: GitHub Flavored Markdown (GFM)
Proposal type: other
See #1202 only focused on the GFM.
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.)
|Section |Count |Percent |
|:---------------------------|:-------:|---------:|
|Tables |3 of 8 |38% |
|Task list items |0 of 2 |0% |
|Strikethrough |1 of 3 |33% |
|Autolinks |10 of 11 |91% |
|Disallowed Raw HTML |0 of 1 |0% |
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?
<td align="right">foo</td>
<td style="text-align: right;">foo</td>
I can see only a few ways forward.
Did I miss anything? Who can make this decision?
My vote is for spec compliance #2
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:');
/cc @joshbruce @styfle @davisjam
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.