showdownjs / showdown

A bidirectional Markdown to HTML to Markdown converter written in Javascript
http://www.showdownjs.com/
MIT License
14.26k stars 1.56k forks source link

No formatting for words surrounded by spaces #865

Closed henry-pc closed 2 years ago

henry-pc commented 3 years ago

Hello! I'm wondering if there is a reason that asterisks are interpreted literally and not as added emphasis when there is a space before the word (see screenshot below for example). Is there no concept of spaces being formattable? In this instance, I would like the word text to be italicized. Would I have to just remove the space before the word "test?"

Screen Shot 2021-09-28 at 2 11 28 PM
SyntaxRules commented 2 years ago

In the github flavored markdown (GFM), a * followed by a space is not a valid way to begin emphasis. According to GFM:

A left-flanking delimiter run is a delimiter run that is (1) not followed by Unicode whitespace ...

Source: https://github.github.com/gfm/#emphasis-and-strong-emphasis

I'm going to close this as a non-issue, but feel free to ping me with follow up questions.