We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e8db85e commit a8b639aCopy full SHA for a8b639a
src/util/string.js
@@ -92,7 +92,7 @@ function overlapCount(a, b) {
92
* Returns true if the string consistently uses Windows line endings.
93
*/
94
export function hasOnlyWinLineEndings(string) {
95
- return string.includes('\r\n') && !string.match(/(?<!\r)\n/);
+ return string.includes('\r\n') && !string.startsWith('\n') && !string.match(/[^\r]\n/);
96
}
97
98
/**
0 commit comments