build: strip clang-format on/off directives from combined source

This commit is contained in:
Bert Belder 2018-11-18 03:06:13 -08:00
parent 653545fd35
commit a82802933a
No known key found for this signature in database
GPG Key ID: 7A77887B2E2ED461

View File

@ -141,7 +141,8 @@ restart: for (let lno = 0; lno < source.length;) {
}
source = source
.map((line) => line.replace(/\s+$/, ''))
.map(line => line.replace(/\/\* clang-format (on|off) \*\//g, ''))
.map(line => line.replace(/\s+$/, ''))
.join('\n')
.replace(/\n{3,}/g, '\n\n')
.replace(/\n*$/, '\n');