]> git.sur5r.net Git - i3/i3/commitdiff
lexer: Allow whitespace before comments
authorMichael Stapelberg <michael@stapelberg.de>
Sun, 27 Sep 2009 15:00:37 +0000 (17:00 +0200)
committerMichael Stapelberg <michael@stapelberg.de>
Sun, 27 Sep 2009 15:00:37 +0000 (17:00 +0200)
src/cfgparse.l

index 7880ef7c4c1be05d7967e7c3129d7419cb53106e..3ca8dcbd257b92fd8826aa096603128faafb34f1 100644 (file)
@@ -18,7 +18,7 @@
 
 %%
 <BIND_A2WS_COND>[^\n]+          { BEGIN(INITIAL); yylval.string = strdup(yytext); return STR; }
-^#[^\n]*                        { return TOKCOMMENT; }
+^[ \t]*#[^\n]*                  { return TOKCOMMENT; }
 <COLOR_COND>[0-9a-fA-F]+        { yylval.string = strdup(yytext); return HEX; }
 [0-9]+                          { yylval.number = atoi(yytext); return NUMBER; }
 bind                            { BEGIN(BIND_COND); return TOKBIND; }