1362 ''' |
1363 ''' |
1363 |
1364 |
1364 def label(self, msg, label): |
1365 def label(self, msg, label): |
1365 '''style msg based on supplied label |
1366 '''style msg based on supplied label |
1366 |
1367 |
1367 Like ui.write(), this just returns msg unchanged, but extensions |
1368 If some color mode is enabled, this will add the necessary control |
1368 and GUI tools can override it to allow styling output without |
1369 characters to apply such color. In addition, 'debug' color mode adds |
1369 writing it. |
1370 markup showing which label affects a piece of text. |
1370 |
1371 |
1371 ui.write(s, 'label') is equivalent to |
1372 ui.write(s, 'label') is equivalent to |
1372 ui.write(ui.label(s, 'label')). |
1373 ui.write(ui.label(s, 'label')). |
1373 ''' |
1374 ''' |
|
1375 if self._colormode is not None: |
|
1376 return color.colorlabel(self, msg, label) |
1374 return msg |
1377 return msg |
1375 |
1378 |
1376 def develwarn(self, msg, stacklevel=1, config=None): |
1379 def develwarn(self, msg, stacklevel=1, config=None): |
1377 """issue a developer warning message |
1380 """issue a developer warning message |
1378 |
1381 |