From 89fccde76596838c503ba5612055004ab05660fd Mon Sep 17 00:00:00 2001 From: NBonaparte Date: Fri, 22 Sep 2017 23:40:31 -0700 Subject: [PATCH] fix(modules): Apply format settings to pre/suffix --- src/modules/meta/base.cpp | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/src/modules/meta/base.cpp b/src/modules/meta/base.cpp index c5db650c..b8d5d9fe 100644 --- a/src/modules/meta/base.cpp +++ b/src/modules/meta/base.cpp @@ -14,8 +14,6 @@ namespace modules { builder->flush(); return ""; } - builder->node(prefix); - if (offset != 0) { builder->offset(offset); } @@ -38,7 +36,23 @@ namespace modules { 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->node(suffix); if (padding > 0) { builder->space(padding); @@ -58,7 +72,6 @@ namespace modules { if (margin > 0) { builder->space(margin); } - builder->node(suffix); return builder->flush(); }