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

Only remove whitespace from end of text node #30

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

knabar
Copy link

@knabar knabar commented Apr 22, 2014

Given an element like

<p>
    <b>A</b> B
</p>

the current code would remove the space before B.

This PR fixes the issue by only removing whitespace from the end of any text node.

@rwestergren
Copy link

Had this same issue and was getting ready to push up a similar fix.

@litvinov-an
Copy link

litvinov-an commented Feb 18, 2020

Given an element like

<p>
    <b>A</b> B
</p>

the current code would remove the space before B.

This PR fixes the issue by only removing whitespace from the end of any text node.

The proposed solution helped me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants