-
-
Notifications
You must be signed in to change notification settings - Fork 1
Missing end-of-file line feed duplicates paragraph #4
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
Comments
@gorango can you provide an example of minified HTML that is causing an issue? |
The regex HTML collapses whitespace. That means that a line feed is seen as a single space character. Sounds like you‘re falling for an XY problem. As Christian mentioned. We need more info. |
Agreed 🤦♂️. I also didn't take into account the Running
Both outputs contained clones of the last sentence in each. Adding any space at the end of the |
To replicate this, you can replace <p>This is <span data-nlcst="source">marked</span>.</p><p data-nlcst="source">Completely marked.</p> You should get similar results if you minify the |
@gorango I tested these two out and:
Removing the EOF EOL (the last |
To clarify, I was running Duplicates in <section>
<h1>My Cats</h1>
<p>You can play with my cat simulator.</p>
<object data="cats.sim">
<p>To see the cat simulator, use one of the following links:</p>
<ul>
<li><a href="cats.sim">Download simulator file</a>
<li><a href="http://sims.example.com/watch?v=LYds5xY4INU">Use online simulator</a>
</ul>
<p>Alternatively, upgrade to the Mellblom Browser.</p>
</object>
<p>I'm quite proud of it.</p></section> I can confirm that the latest PR handles this case as well. |
Closes GH-4. Closes GH-5. Reviewed-by: Christian Murphy <[email protected]>
Thanks for reporting @gorango, it’s all fixed and released now! In the future, please do not remove the issue template, instead, but instead take the time to fill it out correctly. It’s there for a reason! |
Changing line 147 in
test/index.js
to "minify" the incoming html with the following line:This particular change results in 14 failures (I recognize that a proper minification might avoid a few of these failures).
I wonder if this issue should be better addressed in the rehype-parse package?
The text was updated successfully, but these errors were encountered: