From bda614a39b99e00ae5ad24087e3531cc6f878f99 Mon Sep 17 00:00:00 2001 From: melnikovsky <43612263+melnikovsky@users.noreply.github.com> Date: Wed, 6 Sep 2023 21:16:29 +0300 Subject: [PATCH] fix HTML-escaped space padding in notebook (#1506) --- tqdm/notebook.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tqdm/notebook.py b/tqdm/notebook.py index 0f531ab9..b3babace 100644 --- a/tqdm/notebook.py +++ b/tqdm/notebook.py @@ -157,6 +157,8 @@ class tqdm_notebook(std_tqdm): pbar.value = self.n if msg: + # take care of space padding in html + msg=msg.translate({ord(' ') : u'\u2007'}) # html escape special characters (like '&') if '' in msg: left, right = map(escape, re.split(r'\|?\|?', msg, maxsplit=1))