On input, ignore % w/o a { after.
This allows eg “Battery 88%” in the input w/o messing up the colors.
This commit is contained in:
parent
f87c249d21
commit
f07aa2db6f
3
bar.c
3
bar.c
|
@ -362,7 +362,8 @@ parse (char *text)
|
||||||
if (*p == '\0' || *p == '\n')
|
if (*p == '\0' || *p == '\n')
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (*p == '%' && p++ && *p == '{' && (end = strchr(p++, '}'))) {
|
if (*p == '%' && *(p+1) == '{' && (end = strchr(p+2, '}'))) {
|
||||||
|
p += 2;
|
||||||
while (p < end) {
|
while (p < end) {
|
||||||
while (isspace(*p))
|
while (isspace(*p))
|
||||||
p++;
|
p++;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user