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

Strike-through accepts large and mismatching numbers of tildes for prefix and suffix #118

Closed
Crissov opened this issue Oct 5, 2018 · 3 comments

Comments

@Crissov
Copy link

Crissov commented Oct 5, 2018

Everybody agreed in #71 and #99 that double tilde should be the recommended way to mark up stricken text ~~foo~~, although cmark-gfm still needs to support single tilde markers ~foo~ for legacy reasons. However, cmark-gfm also supports triple tildes and really any number of matching tildes ~~~foo~~~ and, what's worse, even any mismatching numbers of tildes before and after the stricken text ~~~foo~, ~foo~~~. I doubt this is necessary for much existing content. Therefore:

  1. Require the same number of tildes on both sides.
  2. Limit this number to 2, keeping legacy support for just 1.

This would solve the (admittedly rare) problem of fenced code blocks being not recognized. commonmark/commonmark-spec#537

~~~foo~~~
should perhaps be a code block
~~~
~~~bar~
should definitely be a code block
~~~
@kivikakk
Copy link

kivikakk commented Oct 7, 2018

You're right — our old parser did not support strikethroughs in number greater than 2. I'll implement this.

@Crissov
Copy link
Author

Crissov commented Oct 8, 2018

Great, thanks. Will you also fix ~~foo~ and ~foo~~?

@kivikakk
Copy link

kivikakk commented Oct 8, 2018

That is indeed fixed in #120.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants