Merge pull request #63 from CheezeCake/fix-quote-bug

Fix C string literals
This commit is contained in:
Michael Opdenacker 2019-10-01 09:28:56 +02:00 committed by GitHub
commit 2b54f4839b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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
}