diff options
author | mathieui <mathieui@mathieui.net> | 2011-05-13 11:34:31 +0200 |
---|---|---|
committer | mathieui <mathieui@mathieui.net> | 2011-05-13 11:34:31 +0200 |
commit | 2860232cc6a70894f8104474bcf8a3a861ac79ac (patch) | |
tree | 031443cef62fd569647f628a9c0d075484def593 /src/xhtml.py | |
parent | c631673cf315dcaadb0c2a76a9e0d62dc840766b (diff) | |
download | poezio-2860232cc6a70894f8104474bcf8a3a861ac79ac.tar.gz poezio-2860232cc6a70894f8104474bcf8a3a861ac79ac.tar.bz2 poezio-2860232cc6a70894f8104474bcf8a3a861ac79ac.tar.xz poezio-2860232cc6a70894f8104474bcf8a3a861ac79ac.zip |
Fix a traceback on C-c ❶ or C-c ², etc
Diffstat (limited to 'src/xhtml.py')
-rw-r--r-- | src/xhtml.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/xhtml.py b/src/xhtml.py index 237ed444..d7ad522a 100644 --- a/src/xhtml.py +++ b/src/xhtml.py @@ -133,7 +133,7 @@ def poezio_colors_to_html(string): if 'strong' not in opened_elements: opened_elements.append('strong') res += '<strong>' - elif attr_char.isnumeric(): + elif attr_char in string.digits: number = int(attr_char) if number in number_to_color_names: if 'strong' in opened_elements: @@ -215,7 +215,7 @@ def poezio_colors_to_xhtml(string): if 'strong' not in open_elements: res += '<strong>' open_elements.append('strong') - elif attr_char.isnumeric(): + elif attr_char in string.digits: self._win.attron(common.curses_color_pair(int(attr_char))) next_attr_char = string.find('\x19') |