From dbec4df54c46e72b3fb44fc6ed7f51ec97101f50 Mon Sep 17 00:00:00 2001 From: CheezeCake Date: Mon, 30 Sep 2019 21:44:30 +0200 Subject: [PATCH] Fix C string literals --- script.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script.sh b/script.sh index e944aaa..8fd8bb5 100755 --- a/script.sh +++ b/script.sh @@ -96,7 +96,7 @@ tokenize_file() git cat-file blob $ref 2>/dev/null | tr '\n' '\1' | - perl -pe 's%((/\*.*?\*/|//.*?\001|"(\\.|.)*?"|# *include *<.*?>|\W)+)(\w+)?%\1\n\4\n%g' | + perl -pe 's%((/\*.*?\*/|//.*?\001|[^'"'"']"(\\.|.)*?"|# *include *<.*?>|\W)+)(\w+)?%\1\n\4\n%g' | head -n -1 }