nitlanguage
/
nit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5660314
)
console: move up services from String to Text, and update doc
author
Alexis Laferrière
<alexis.laf@xymus.net>
Fri, 16 Mar 2018 14:40:44 +0000
(10:40 -0400)
committer
Alexis Laferrière
<alexis.laf@xymus.net>
Wed, 28 Mar 2018 13:27:05 +0000
(09:27 -0400)
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
lib/console.nit
patch
|
blob
|
history
diff --git
a/lib/console.nit
b/lib/console.nit
index
3333cad
..
917f893
100644
(file)
--- a/
lib/console.nit
+++ b/
lib/console.nit
@@
-279,8
+279,8
@@
class TermCharFormat
fun default_bg: TermCharFormat do return apply("49")
end
-# Redefine the `String` class to add functions to color the string.
-redef class String
+# Services to color terminal output
+redef class Text
private fun apply_format(f: TermCharFormat): String do
return "{f}{self}{normal}"
end