summary refs log tree commit diff
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
commit120118ddfb1b487585f4b9ae399b6c5c32ae7c48 (patch)
tree4f62219341358559f48e0edbd292b08313b946be
parentSkip only one character if a match fails due to parent (diff)
downloadsrc-120118ddfb1b487585f4b9ae399b6c5c32ae7c48.tar.gz
src-120118ddfb1b487585f4b9ae399b6c5c32ae7c48.zip
Don't match DQ string inside SQ string
Diffstat (limited to '')
-rw-r--r--bin/hi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/hi.c b/bin/hi.c
index 5b2c17db..50b9b064 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]+)" },