miyuchina / mistletoe

A fast, extensible and spec-compliant Markdown parser in pure Python.
MIT License
841 stars 119 forks source link

Parsing error in a specific case #136

Closed manojpatwardhan closed 2 years ago

manojpatwardhan commented 2 years ago

If I have this text in markdown:

**_Week_**day

It converts to:

****day

Note that there is no space before "day".

But, if I add a space after the last pair of *, it works correctly. So this text:

**_Week_** day

Converts correctly to:

Week day

where "Week" is in bold and italic.

pbodnar commented 2 years ago

Hi @manojpatwardhan, I've made some formatting to your original report, let me know in case it is not correct.

I've tried to run the current version of mistletoe on the "problematic" input you write:

**_Week_**day

Unlike you, I get this back (I paste the resulting HTML for simplicity here):

<p>**<em>Week</em>**day</p>

I hope this is correct, because when testing here, I get the same result from the GitHub's markdown formatter:

Weekday

So can you please re-check? If you still get the wrong result, which version of mistletoe do you use?

manojpatwardhan commented 2 years ago

Thanks very much, Petr.

I will test next week and let you know what I find out. Appreciate your help and the fix!

pbodnar commented 2 years ago

@manojpatwardhan, feel free to reopen in case you do find some error in the aforementioned use case.