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

Wrong markdown when convert bold text #14

Closed
tiennampham23 opened this issue Jun 30, 2021 · 4 comments
Closed

Wrong markdown when convert bold text #14

tiennampham23 opened this issue Jun 30, 2021 · 4 comments
Labels
bug Something isn't working

Comments

@tiennampham23
Copy link

tiennampham23 commented Jun 30, 2021

Hi Ron, first of all, I am very excited about your library, it's so fast. But maybe it has a mirror bug.

My example HTML:

image

<p><strong style="color: rgb(51, 51, 51);">1944:&nbsp;</strong><span style="color: rgb(51, 51, 51);">Maren Larsen is a blonde beauty from a small Minnesota farming town.</span></p>

My Markdown output:

**1944:&nbsp;**Maren Larsen is a blonde beauty from a small Minnesota farming town.

You can see this output, Beside "1994" that has a non-break space. So it's a bold style of this year will be not worked properly.

Expect result:

**1944**Maren Larsen is a blonde beauty from a small Minnesota farming town.

I tried to use the other libraries like turndown and it's worked properly. I love your library and so, I create an issue to report to you. I hope you can consider this issue and reply to me. Thank you

@nonara
Copy link
Collaborator

nonara commented Jun 30, 2021

Thanks for the report and the kind words, Tien! I'm glad you like the library.

Looks like there is an upstream issue in the parser. I didn't realize that text nodes weren't being properly decoded. I have a PR submitted for the parser and will make sure this is cleared up when it's done.

To me, this would be the appropriate output:

**1944:** Maren Larsen is a blonde beauty from a small Minnesota farming town.

Which would display as:

1944: Maren Larsen is a blonde beauty from a small Minnesota farming town.

When the PR closes, I'll ensure that everything is good and bump the parser version.

@nonara
Copy link
Collaborator

nonara commented Jul 7, 2021

Update: Upstream fix is ready. I will be addressing this ASAP.

@tiennampham23
Copy link
Author

Awesome, thank you!

@nonara nonara reopened this Jul 9, 2021
@nonara nonara added bug Something isn't working and removed awaiting-upstream-fix labels Jul 9, 2021
@nonara nonara closed this as completed in 1e59887 Jul 11, 2021
@nonara
Copy link
Collaborator

nonara commented Jul 11, 2021

Fixed in v1.0.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants