snarkdown
snarkdown copied to clipboard
Snake_case underscores create italics
This may be out of scope for this project, but snake_case currently will italicize case. I believe underscores should only create emphasis if they're surrounded by whitespace _like this_
Snarkdown:

Commonmark:

Ah for sure. The parser can probably be tweaked to fix this.
Actually hm, according to the original markdown post on daringfireball I think snarkdown's behavior here is correct. This might be a spec difference between commonmark and "traditional" markdown, I haven't yet read the commonmark spec on the subject to be sure.
If that is the case, I suppose it's up to you which one you want to support.
Regardless, thanks again! And no urgency on this or anything, of course.
I see the value of skipping foo_bar for sure.
It seems that single underscores in links are parsed too, which makes posting links difficult:
https://www.beyonk.com/uk/tohp-_/ben-nevis-guiding
becomes
https://www.beyonk.com/uk/tohp-/ben-nevis-guiding
I think this is an actual issue, since the phrase is not wrapped per-se, it's a single occurrence.
Could reproduce this problem as well. Any plan to fix it soon?
Note that there is a lot of specifics in CommonMark that you may not want to implement in a single regex:
AS~~asdsa~~.
AS_ASD_
AS__ASD_
AS*ASD**
AS*ASD* (x)
AS*ASD
**A*
Rendered:

A tiny library may ship with certain limitations.
Not wanting to implement every edge-case shouldn't prevent to handle common cases, right?
We can live with some differences with CommonMark, but breaking links due to a single underscore is a little harder to live with.
Can #101 be considered?