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] == '{')