fix(modules): Apply format settings to pre/suffix
This commit is contained in:
parent
9da06c0ec2
commit
89fccde765
1 changed files with 16 additions and 3 deletions
|
@ -14,8 +14,6 @@ namespace modules {
|
||||||
builder->flush();
|
builder->flush();
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
builder->node(prefix);
|
|
||||||
|
|
||||||
if (offset != 0) {
|
if (offset != 0) {
|
||||||
builder->offset(offset);
|
builder->offset(offset);
|
||||||
}
|
}
|
||||||
|
@ -38,7 +36,23 @@ namespace modules {
|
||||||
builder->space(padding);
|
builder->space(padding);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
builder->node(prefix);
|
||||||
|
|
||||||
|
if (!bg.empty()) {
|
||||||
|
builder->background(bg);
|
||||||
|
}
|
||||||
|
if (!fg.empty()) {
|
||||||
|
builder->color(fg);
|
||||||
|
}
|
||||||
|
if (!ul.empty()) {
|
||||||
|
builder->underline(ul);
|
||||||
|
}
|
||||||
|
if (!ol.empty()) {
|
||||||
|
builder->overline(ol);
|
||||||
|
}
|
||||||
|
|
||||||
builder->append(move(output));
|
builder->append(move(output));
|
||||||
|
builder->node(suffix);
|
||||||
|
|
||||||
if (padding > 0) {
|
if (padding > 0) {
|
||||||
builder->space(padding);
|
builder->space(padding);
|
||||||
|
@ -58,7 +72,6 @@ namespace modules {
|
||||||
if (margin > 0) {
|
if (margin > 0) {
|
||||||
builder->space(margin);
|
builder->space(margin);
|
||||||
}
|
}
|
||||||
builder->node(suffix);
|
|
||||||
|
|
||||||
return builder->flush();
|
return builder->flush();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue