Skip to content
This repository has been archived by the owner on Mar 23, 2018. It is now read-only.

Remove unnecessary whitespace from tag contents, closes #6 #12

Merged
merged 1 commit into from Apr 5, 2017

Conversation

goto-bus-stop
Copy link
Owner

It's not quite perfect, but better:

bel`
  <div>
    Contents
  </div>
`

currently gives

_div = document.createElement('div'), _div.textContent = '\n    Contents\n  '

but with this patch gives

_div = document.createElement('div'), _div.textContent = ' Contents '

@soyuka
Copy link

soyuka commented Apr 5, 2017

Looks great, hope it'll get merged soon :)!

@goto-bus-stop
Copy link
Owner Author

Yeah, I wanted to try it out in a few existing projects before merging to make sure that it doesn't break anything. normalize-html-whitespace is quite conservative luckily and it seems to be fine in all projects I tried :)

@goto-bus-stop goto-bus-stop merged commit f3fb195 into master Apr 5, 2017
@soyuka
Copy link

soyuka commented Apr 5, 2017

haha nice, can you publish? Thanks!

@soyuka
Copy link

soyuka commented Apr 5, 2017

god nvm, you're fast, thanks

@goto-bus-stop
Copy link
Owner Author

:) np!

@goto-bus-stop goto-bus-stop deleted the feature/strip-whitespace branch May 5, 2017 22:57
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants