erusev / parsedown

Better Markdown Parser in PHP
https://parsedown.org
MIT License
14.69k stars 1.12k forks source link

Add comma to specialCharacters list #819

Open grimalschi opened 2 years ago

grimalschi commented 2 years ago

This solves wrong behaviour with escaped commas.

You can see this wrong behaiviour using "1. Hello\, world!" phrase at https://parsedown.org/demo

Screenshot 2021-11-21 at 07 30 55

This is important because this kind of escape ("1. Hello\, world!") produced by one of most famous markdown editors - TUI editor.

2021-11-21 07 34 23

If you write list without marking its as a real list, you will get this kind of escaping and then if you use result in Parsedown, you see "\," instead of just commas.

grimalschi commented 2 years ago

CommonMark also "unescapes" commas: https://spec.commonmark.org/dingus/?text=1%5C.%20Hello%5C%2C%20world!