Correct the clean-up of such defines that continue across multiple
lines, like follows:
#define CONFIG_FOO "this continues to the next line " \
"this line should be removed too" \
"this line should be removed as well"
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
matched = []
for i, line in enumerate(lines):
+ if i - 1 in matched and lines[i - 1][-2:] == '\\\n':
+ matched.append(i)
+ continue
for pattern in patterns:
if pattern.search(line):
matched.append(i)