summary refs log tree commit diff
path: root/bin/hi.c
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2019-02-10 17:42:47 -0500
committerJune McEnroe <june@causal.agency>2019-02-10 17:42:47 -0500
commitf164c7a39a279f0f1224f7872486e32ec9ade7c9 (patch)
tree86600f683e1c59140a1a824a351a806a5fb041ff /bin/hi.c
parentSkip only one character if a match fails due to parent (diff)
downloadsrc-f164c7a39a279f0f1224f7872486e32ec9ade7c9.tar.gz
src-f164c7a39a279f0f1224f7872486e32ec9ade7c9.zip
Don't match DQ string inside SQ string
Diffstat (limited to 'bin/hi.c')
-rw-r--r--bin/hi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/hi.c b/bin/hi.c
index e7b826f8..d071a876 100644
--- a/bin/hi.c
+++ b/bin/hi.c
@@ -86,7 +86,7 @@ static const struct Syntax CSyntax[] = {
 		.pattern = "include" WS "(<[^>]*>)" },
 	{ String,
 		.pattern = "[LUu]?" PATTERN_SQ },
-	{ String,
+	{ String, .parent = ~SET(String),
 		.pattern = "([LU]|u8?)?" PATTERN_DQ },
 	{ Escape, .parent = SET(String),
 		.pattern = "[\\]([\"'?\\abfnrtv]|[0-7]{1,3}|x[0-9A-Fa-f]+)" },