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

Regression with literalMidWordAsterisks #398

Closed
zakness opened this issue Jun 7, 2017 · 3 comments
Closed

Regression with literalMidWordAsterisks #398

zakness opened this issue Jun 7, 2017 · 3 comments
Assignees
Labels

Comments

@zakness
Copy link

zakness commented Jun 7, 2017

It seems literalMidWordAsterisks is treating some non-word characters (such as ,) as word characters and not converting to HTML properly. This was working correctly in 1.3.0 but not in 1.7.1 (these are the only versions I’ve tested).

Correct behavior in 1.3.0:

const md = new showdown.Converter({ literalMidWordAsterisks: true })
md.makeHtml('strippers, **hitler**, and stalin')
// → <p>strippers, <strong>hitler</strong>, and stalin</p>

Incorrect in 1.7.1:

const md = new showdown.Converter({ literalMidWordAsterisks: true })
md.makeHtml('strippers, **hitler**, and stalin')
// → <p>strippers, **hitler**, and stalin</p>

If you remove the literalMidWordAsterisks option in 1.7.1 it works again:

const md = new showdown.Converter()
md.makeHtml('strippers, **hitler**, and stalin')
// → <p>strippers, <strong>hitler</strong>, and stalin</p>
@tivie tivie self-assigned this Jun 8, 2017
@tivie tivie added the bug label Jun 8, 2017
@tivie
Copy link
Member

tivie commented Jun 8, 2017

confirmed

@tivie
Copy link
Member

tivie commented Aug 5, 2017

literalMidWordsAsterisk option was only introduced in version 1.7.0, so in version 1.3.0 it does nothing.

@tivie
Copy link
Member

tivie commented Aug 5, 2017

Should be fixed now

@tivie tivie closed this as completed in 8f05be7 Aug 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants