equal
deleted
inserted
replaced
132 % (e, status)) |
132 % (e, status)) |
133 _styles[status] = ' '.join(good) |
133 _styles[status] = ' '.join(good) |
134 |
134 |
135 _buffers = None |
135 _buffers = None |
136 def style(msg, label): |
136 def style(msg, label): |
137 effects = '' |
137 effects = [] |
138 for l in label.split(): |
138 for l in label.split(): |
139 effects += _styles.get(l, '') |
139 s = _styles.get(l, '') |
|
140 if s: |
|
141 effects.append(s) |
|
142 effects = ''.join(effects) |
140 if effects: |
143 if effects: |
141 return '\n'.join([render_effects(s, effects) |
144 return '\n'.join([render_effects(s, effects) |
142 for s in msg.split('\n')]) |
145 for s in msg.split('\n')]) |
143 return msg |
146 return msg |
144 |
147 |