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

*"Yo"* not outputted correctly #1358

Closed
cloudkite opened this issue Oct 17, 2018 · 8 comments
Closed

*"Yo"* not outputted correctly #1358

cloudkite opened this issue Oct 17, 2018 · 8 comments
Labels
category: inline elements L1 - broken Valid usage causes incorrect output OR a crash AND there is no known workaround for the issue

Comments

@cloudkite
Copy link

cloudkite commented Oct 17, 2018

Describe the bug
Emphasize not working when text contains double quotes

To Reproduce
Steps to reproduce the behavior:

marked demo
commonmark demo

@UziTech UziTech added the L1 - broken Valid usage causes incorrect output OR a crash AND there is no known workaround for the issue label Oct 18, 2018
@styfle
Copy link
Member

styfle commented Oct 18, 2018

Hi Jonas, thanks for the bug report!

This is indeed a bug in 0.5.1 and also in the latest code on master.

Would you like to submit a PR to fix this?

@cloudkite
Copy link
Author

cloudkite commented Oct 20, 2018

Started to look at this and found a couple more failing cases

*"Yo"*
*"Yo*
*Yo"*
a*yo"*
a*"yo*
a*"yo"*
a *"yo"*

*< yo >*
*<yo*
*yo>*
a*yo>*
a*<yo*
a*yo<*
a*>yo*
a*< yo >*
a *< yo >*

*[yo]*
*[yo*
*yo]*
a*yo]*
a*[yo*
a*yo[*
a*]yo*
a*[yo]*
a *[yo]*

a*(Yo*

Fixing this is seems like a fairly invasive change as it requires lookahead for square bracket and angle bracket ie to make sure *[yo* works but *[yo*](uri) does not.

Implementing lookahead seems like it would have a performance impact? Any ideas on how you would recommend approaching this?

@styfle
Copy link
Member

styfle commented Oct 21, 2018

/cc @davisjam

@Feder1co5oave
Copy link
Contributor

Feder1co5oave commented Oct 25, 2018

This was introduced in 0ba2522

@dialex
Copy link

dialex commented Dec 16, 2019

It's been more than a year, and this is still an issue (as reported in docsifyjs/docsify#976 and docsifyjs/docsify#787). Is anyone fixing it? Please prioritise it 🙏

dialex added a commit to dialex/start-testing that referenced this issue Dec 16, 2019
@UziTech
Copy link
Member

UziTech commented Dec 16, 2019

@dialex if you want to submit a PR I would be happy to review it 😁

@dialex
Copy link

dialex commented Dec 16, 2019

I would if I could, I don't know enough of JS or MarkedJS to be of any help.
I'll ask Santa for Christmas 🎅😁

Workaround: use _"Yo"_ instead of *"Yo"*

@UziTech
Copy link
Member

UziTech commented Nov 3, 2020

This was fixed in #1686 released in v1.1.1

@UziTech UziTech closed this as completed Nov 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: inline elements L1 - broken Valid usage causes incorrect output OR a crash AND there is no known workaround for the issue
Projects
None yet
Development

No branches or pull requests

5 participants