fix(label): Do not erase false positives

This commit is contained in:
Michael Carlberg 2016-11-22 23:10:35 +01:00
parent c6e861083b
commit b14e55f729

View File

@ -88,12 +88,13 @@ namespace drawtypes {
while ((start = line.find('%')) != string::npos && (end = line.find('%', start + 1)) != string::npos) { while ((start = line.find('%')) != string::npos && (end = line.find('%', start + 1)) != string::npos) {
auto token = line.substr(start, end - start + 1); auto token = line.substr(start, end - start + 1);
line.erase(start, end - start + 1);
// ignore false positives (lemonbar-style declarations) // ignore false positives (lemonbar-style declarations)
if (token[1] == '{') if (token[1] == '{') {
line.erase(0, start + 1);
continue; continue;
}
line.erase(start, end - start + 1);
bound.emplace_back(bounds{token, 0, 0}); bound.emplace_back(bounds{token, 0, 0});
// find min delimiter // find min delimiter