From 81c3dc32a8e48aee076e4b28cae0037a4ae254d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20Mart=C3=ADnez?= Date: Tue, 28 Mar 2017 16:55:39 -0300 Subject: Add functions to strip color information. (#5472) --- doc/client_lua_api.md | 6 ++++++ doc/lua_api.txt | 6 ++++++ 2 files changed, 12 insertions(+) (limited to 'doc') diff --git a/doc/client_lua_api.md b/doc/client_lua_api.md index f7a1094f0..d5ccef5d3 100644 --- a/doc/client_lua_api.md +++ b/doc/client_lua_api.md @@ -818,6 +818,12 @@ The following functions provide escape sequences: * `color` is a ColorString * The escape sequence sets the background of the whole text element to `color`. Only defined for item descriptions and tooltips. +* `color.strip_foreground_colors(str)` + * Removes foreground colors added by `get_color_escape_sequence`. +* `color.strip_background_colors(str)` + * Removes background colors added by `get_background_escape_sequence`. +* `color.strip_colors(str)` + * Removes all color escape sequences. `ColorString` ------------- diff --git a/doc/lua_api.txt b/doc/lua_api.txt index 2ac8f1077..72599cb7c 100644 --- a/doc/lua_api.txt +++ b/doc/lua_api.txt @@ -1872,6 +1872,12 @@ The following functions provide escape sequences: * `color` is a ColorString * The escape sequence sets the background of the whole text element to `color`. Only defined for item descriptions and tooltips. +* `color.strip_foreground_colors(str)` + * Removes foreground colors added by `get_color_escape_sequence`. +* `color.strip_background_colors(str)` + * Removes background colors added by `get_background_escape_sequence`. +* `color.strip_colors(str)` + * Removes all color escape sequences. Spatial Vectors --------------- -- cgit v1.2.3