Skip to content

Conversation

@cscott
Copy link
Contributor

@cscott cscott commented Feb 3, 2016

For example, the input \r\n\n\r should represent three new lines. But:

> text = '\r\n\n\r'
> text.replace(/(\r|\n){1,2}/g, "\n");  // previous code says this is only two newlines
'\n\n'
> text.replace(/(\r\n?|\n)/g, "\n"); // this patch returns three, as expected.
'\n\n\n'

This PR fixes issue #155.

@XhmikosR XhmikosR added this to the v0.2.6 milestone Feb 5, 2016
XhmikosR added a commit that referenced this pull request Feb 5, 2016
Fix line numbers when the input contains multiple sequential \n characters.
@XhmikosR XhmikosR merged commit adda2eb into CSSLint:master Feb 5, 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.

2 participants