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

Fix problems with rmWhitespace #407

Merged
merged 1 commit into from Nov 19, 2018
Merged

Fix problems with rmWhitespace #407

merged 1 commit into from Nov 19, 2018

Conversation

nwoltman
Copy link
Contributor

Make rmWhitespace safer by handling empty lines better and not removing newlines around EJS tags.

Fixes #406

Example

<h2>
  <%- 'EJS' %>
  Title
</h2>
<div>
  <span>1</span>
  <span>2</span>

  <span>3</span>
</div>

Before:

<h2>
EJSTitle
</h2>
<div>
<span>1</span>
<span>2</span><span>3</span>
</div>

After:

<h2>
EJS
Title
</h2>
<div>
<span>1</span>
<span>2</span>
<span>3</span>
</div>

Make `rmWhitespace` safer by handling empty lines better and *not* removing newlines around EJS tags.
@mde
Copy link
Owner

mde commented Nov 19, 2018

LGTM. Thanks so much for this!

@mde mde merged commit 59ac6ef into mde:master Nov 19, 2018
@nwoltman nwoltman deleted the fix-rmwhitespace branch November 19, 2018 16:51
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.

None yet

2 participants