From a82802933afe600166da2d4fcf5cf05148141434 Mon Sep 17 00:00:00 2001 From: Bert Belder Date: Sun, 18 Nov 2018 03:06:13 -0800 Subject: [PATCH] build: strip clang-format on/off directives from combined source --- tools/combine.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/combine.js b/tools/combine.js index 808f574..e08b66a 100644 --- a/tools/combine.js +++ b/tools/combine.js @@ -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');