mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-09 10:27:49 +00:00
Have build remove trailing spaces in lines.
Former-commit-id: 580650186c9661b900ebbe846e13ba194fd2c0bc
This commit is contained in:
6
build.js
6
build.js
@@ -1135,10 +1135,10 @@
|
|||||||
})
|
})
|
||||||
// remove unneeded horizontal rule comment separators
|
// remove unneeded horizontal rule comment separators
|
||||||
.replace(/(\{\n)\s*\/\*-+\*\/\n|^ *\/\*-+\*\/\n(\s*\})/gm, '$1$2')
|
.replace(/(\{\n)\s*\/\*-+\*\/\n|^ *\/\*-+\*\/\n(\s*\})/gm, '$1$2')
|
||||||
// remove extraneous whitespace
|
// remove lines with just spaces and semicolons
|
||||||
.replace(/^ *\n/gm, '\n')
|
|
||||||
// remove lines with just whitespace and semicolons
|
|
||||||
.replace(/^ *;\n/gm, '')
|
.replace(/^ *;\n/gm, '')
|
||||||
|
// remove trailing spaces from lines
|
||||||
|
.replace(/ *$/gm, '')
|
||||||
// consolidate multiple newlines
|
// consolidate multiple newlines
|
||||||
.replace(/\n{3,}/g, '\n\n')
|
.replace(/\n{3,}/g, '\n\n')
|
||||||
// add trailing newline
|
// add trailing newline
|
||||||
|
|||||||
Reference in New Issue
Block a user