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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix whitespace between comments followed by tags #525

Merged
merged 4 commits into from
Mar 2, 2016
Merged

fix whitespace between comments followed by tags #525

merged 4 commits into from
Mar 2, 2016

Conversation

alexlamsl
Copy link
Collaborator

Run into this whilst fixing #499 - I'll let the tests speak for itself 馃懟

@@ -796,6 +796,21 @@
buffer.length = Math.max(0, index);
}

function squashTrailingWhitespace(nextTag) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please add a comment as to what "squash" means here (since it's kind of ambiguous).

@alexlamsl
Copy link
Collaborator Author

@kangax added comment and rebased - I hope it's not too confusing for you, and I welcome any suggestion to make the text clearer...

// element which has now been removed
function squashTrailingWhitespace(nextTag) {
var charsIndex;
if (buffer.length > 1 && /^(?:<!|$)/.test(buffer[buffer.length - 1]) && /\s$/.test(buffer[buffer.length - 2])) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM but after shortening this line (let's try to keep length <80)

alexlamsl added a commit that referenced this pull request Mar 2, 2016
fix whitespace between comments followed by tags
@alexlamsl alexlamsl merged commit 8ecea94 into kangax:gh-pages Mar 2, 2016
@alexlamsl alexlamsl mentioned this pull request Mar 8, 2016
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