From: Michael Stapelberg Date: Fri, 13 May 2011 15:03:15 +0000 (+0200) Subject: Bugfix: Fix the WANT_QSTRING state X-Git-Tag: tree-pr3~35 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=62e977102b71941f83e267754459bdc93d696c89;p=i3%2Fi3 Bugfix: Fix the WANT_QSTRING state --- diff --git a/src/cmdparse.l b/src/cmdparse.l index f07420d3..3e5dc889 100644 --- a/src/cmdparse.l +++ b/src/cmdparse.l @@ -74,6 +74,15 @@ EOL (\r?\n) cmdyylval.string = copy; return STR; } +\"[^\"]+\" { + BEGIN(INITIAL); + /* strip quotes */ + char *copy = sstrdup(yytext+1); + copy[strlen(copy)-1] = '\0'; + cmdyylval.string = copy; + return STR; + } + [^;\n]+ { BEGIN(INITIAL); cmdyylval.string = sstrdup(yytext); return STR; } [ \t]* { return WHITESPACE; }