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

Parsedown does not escape * character inside of backticks #461

Open
ek68794998 opened this issue Jan 14, 2017 · 2 comments
Open

Parsedown does not escape * character inside of backticks #461

ek68794998 opened this issue Jan 14, 2017 · 2 comments
Labels
Milestone

Comments

@ek68794998
Copy link

Note: Please see referenced issue.

If given the following input...

*(Test `a*b` test`.)*

... Parsedown will actually parse it into something like...

<i>(Test `a</i>b<code> test</code>.)*

Whereas it should be parsed into...

<i>(Test <code>a*b</code> test`.)</i>

This is in line with how, for example, GitHub renders it: (Test a*b test`.)

Here is a shot from the online Parsedown demo displaying the issue (thanks, @flaviocopes!):

@aidantwoods
Copy link
Collaborator

Among other things, noted here already 😉 #434 (see: "Issues elsewhere").

@erusev Parsedown will have to change its parsing strategy for inline elements to fix this one (assign priority to inline code – since escapes for most characters don't (and shouldn't) work there). Inline code is a bit of a special case when it comes to priority of inline markers – I think the order of first occurrence based approach is correct for other markers though.

In terms of correctness – I'm not even sure that the commonmark reference parser has been equipped to deal with some cases of element nesting ¯\_(ツ)_/¯
screen shot 2017-01-14 at 18 04 47

@ek68794998
Copy link
Author

@aidantwoods Thanks for the link!

Looks like that bug has been open for around 3 months now. Is it being actively worked on?

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