summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Davenport <qball@gmpclient.org>2020-10-02 19:15:19 +0200
committerDave Davenport <qball@gmpclient.org>2020-10-02 19:15:19 +0200
commit7c9a01ffc734a3a548c2e2c0f06b28fed0938034 (patch)
tree921ce90d2cf2c05c04cdb8466bbd714286bd8581
parentb4bbce4af5593486ce322bfaa55ef83f75a8b7a6 (diff)
[Lexer] Fix parsing string in dict not to match " in middle of string.
Fixes: 1205
-rw-r--r--lexer/theme-lexer.l6
1 files changed, 5 insertions, 1 deletions
diff --git a/lexer/theme-lexer.l b/lexer/theme-lexer.l
index 077c3797..c3bc99d0 100644
--- a/lexer/theme-lexer.l
+++ b/lexer/theme-lexer.l
@@ -155,6 +155,7 @@ static double rofi_theme_parse_convert_hex ( char high, char low)
ASC [\x00-\x7f]
ASCN [\x00-\t\v-\x7f]
+ASCNP [\x00-\t\v-\x21\x23-\x7f]
U [\x80-\xbf]
U2 [\xc2-\xdf]
U3 [\xe0-\xef]
@@ -164,12 +165,15 @@ U4 [\xf0-\xf4]
UANYN {ASCN}|{U2}{U}|{U3}{U}{U}|{U4}{U}{U}{U}
// UONLY {U2}{U}|{U3}{U}{U}|{U4}{U}{U}{U}
+UANYNP {ASCNP}|{U2}{U}|{U3}{U}{U}|{U4}{U}{U}{U}
+
WHITESPACE [[:blank:]]
WSO [[:blank:]]*
WORD [[:alnum:]-]+
MEDIA_NAME [[:alpha:]-]+
COLOR_NAME [[:alpha:]]+
STRING \"{UANYN}*\"
+STRING_LIST \"{UANYNP}*\"
CHAR \'({ASCN}|\\\\|\\\'|\\0)\'
HEX [[:xdigit:]]
NUMBER [[:digit:]]
@@ -709,7 +713,7 @@ if ( queue == NULL ){
yylval->sval = g_strdup(yytext);
return T_ELEMENT;
}
-<PROPERTIES_LIST>{STRING} {
+<PROPERTIES_LIST>{STRING_LIST} {
yytext[yyleng-1] = '\0';
yylval->sval = g_strdup(yytext+1);
return T_ELEMENT;