1
0
Fork 0
mirror of https://github.com/polybar/polybar.git synced 2024-11-11 13:50:56 -05:00

fix(label): Patch token extraction

Ref #182
This commit is contained in:
Michael Carlberg 2016-11-22 21:14:34 +01:00
parent 5028779528
commit 7c60998459

View file

@ -86,9 +86,9 @@ namespace drawtypes {
string line{text};
while ((start = line.find('%')) != string::npos && (end = line.find('%', start + 1)) != string::npos) {
auto token = line.substr(start, end + 1);
auto token = line.substr(start, end - start + 1);
line.erase(0, end);
line.erase(start, end - start + 1);
// ignore false positives (lemonbar-style declarations)
if (token[1] == '{')