tools/bundle: don't emit empty line when stripping 'clang-format on|off' comment
This commit is contained in:
parent
e9fa25980b
commit
71e9ea6664
@ -156,7 +156,7 @@ restart: for (let lno = 0; lno < source.length; ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
source = source
|
source = source
|
||||||
.map(line => line.replace(/\/\* clang-format (on|off) \*\//g, ''))
|
.filter(line => !/^\s*\/\* clang-format (on|off) \*\/\s*$/.test(line))
|
||||||
.map(line => line.replace(/\s+$/, ''))
|
.map(line => line.replace(/\s+$/, ''))
|
||||||
.join('\n')
|
.join('\n')
|
||||||
.replace(/\n{3,}/g, '\n\n')
|
.replace(/\n{3,}/g, '\n\n')
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user