github/cmark-gfm

Request for a tiny update to the GFM spec

kivikakk opened this issue · 9 comments

Hi folks! Happy August.

I'm the previous maintainer of cmark-gfm (from ~its inception until I left GitHub in Dec 2019). I have committed a slight error and as an ongoing maintainer in the CommonMark space, would love if anyone could help me out here. I'll ping @phillmv due to our earlier work together. :)

The GFM spec is the CommonMark 0.29 spec plus additions for cmark-gfm extensions. (Hubbers will probably find the repo for that spec here if it hasn't moved since. It might require a bit of hijinx to deploy a new version of the spec to the website.) I wrote the spec "extensions" in all their underspecified glory.

I'm wondering if someone wouldn't mind updating the section on strikethroughs and updating the spec site. Right now it reads:

Strikethrough text is any text wrapped in two tildes (~).

I wrote that line originally even as I later confirmed in #71 (comment) that you can use one OR two tildes in our implementation (and that we had to keep it that way).

In other words, it should read:

Strikethrough text is any text wrapped in a matching pair of one or two tildes (~).

The examples should then include both single, double, and ideally triple tildes (as counterexample). Here's my serving suggestion for something you could drop right in — I've confirmed it passes tests:

<div class="extension">

## Strikethrough (extension)

GFM enables the `strikethrough` extension, where an additional emphasis type is
available.

Strikethrough text is any text wrapped in a matching pair of one or two tildes
(`~`).

```````````````````````````````` example strikethrough
~~Hi~~ Hello, ~there~ world!
.
<p><del>Hi</del> Hello, <del>there</del> world!</p>
````````````````````````````````

As with regular emphasis delimiters, a new paragraph will cause strikethrough
parsing to cease:

```````````````````````````````` example strikethrough
This ~~has a

new paragraph~~.
.
<p>This ~~has a</p>
<p>new paragraph~~.</p>
````````````````````````````````

Three or more tildes do not create a strikethrough:

```````````````````````````````` example strikethrough
This will ~~~not~~~ strike.
.
<p>This will ~~~not~~~ strike.</p>
````````````````````````````````

</div>

I thought the spec was originally that way, and the change was intentional? Ref: #99 (comment)

Can GitHub please document that GitHub does not follow GFM in this case? A spec that nobody follows is... not a spec, it’s fiction. It hurts open source maintainers that follow GFM, GH’s own customer support service, and authors.

(n.b. this comment was written as this issue is closed without comment and the spec currently still reads two tildes, but perhaps it takes time for the spec to update?)

Oops, the issue auto-closed when the PR merged, I'll update the github page tomorrow.

Thank you! (Which PR are you talking about? Typically it's shown in the ui here but now it wasn't, hence I thought it was just closed)

Typically it's shown in the ui here but now it wasn't, hence I thought it was just closed

PRs from private projects can close issues in public ones, so that's likely what's happened here!

Thanks Phill!

Can we also get footnotes and other updates in the spec?

@phillmv Could you or someone else at GitHub look into getting an updated HTML-rendered version of the spec published? See details in this issue: #288

Thanks!