Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Inconsistencies in <strong> and <em> conversions #9

Closed
dsoaress opened this issue Apr 17, 2021 · 4 comments
Closed

Inconsistencies in <strong> and <em> conversions #9

dsoaress opened this issue Apr 17, 2021 · 4 comments

Comments

@dsoaress
Copy link

Hi, I noticed two inconsistencies in the conversion when the HTML source has <strong> and <em>. The generated markdown comes without the before and after spaces.

Examples:

<!-- html source -->
<p>Hello <strong>world</strong>!</p>
<!-- markdown -->
Hello**world**!
<!-- html source -->
<p>Lorem <em>ipsum</em> dolor sit.</p>
<!-- markdown -->
Lorem*ipsum*dolor sit.

<!-- 
    I put the emphasis as an asterisk here in the 
    example just to enable the syntax highlighting 
    here from GitHub 
-->

I'm using it without any options enabled.

NodeHtmlMarkdown.translate(rawBody)
@nonara
Copy link
Collaborator

nonara commented Apr 23, 2021

That definitely shouldn't happen! Thanks for reporting it. Looking into it now.

@nonara
Copy link
Collaborator

nonara commented Apr 23, 2021

Looks like the issue is upstream, in the parser. I've filed an issue taoqf/node-html-parser#115

If it can't be addressed quickly, I'll see if I can submit a PR. Will post updates here as I get them

@nonara
Copy link
Collaborator

nonara commented May 22, 2021

I have a PR in the pipeline. Hopefully we'll have this sorted soon.

@nonara nonara closed this as completed in ff61746 Jun 11, 2021
@nonara
Copy link
Collaborator

nonara commented Jun 11, 2021

Sorry for the delay on this. I had the fix sitting there and thought I'd pushed it through. Fixed in v0.1.7

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

2 participants