From 6306e4ef587bc0a8934b8ba9408377527416f985 Mon Sep 17 00:00:00 2001 From: Solderpunk Date: Sun, 7 Jun 2020 19:06:39 +0200 Subject: [PATCH] Do not strip non-breaking spaces from advanced line types. --- av98.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/av98.py b/av98.py index f0ebb3b..f40eba2 100755 --- a/av98.py +++ b/av98.py @@ -6,6 +6,7 @@ # - danceka # - # - +# - Klaus Alexander Seistrup import argparse import cmd @@ -823,17 +824,17 @@ Slow internet connection? Use 'set timeout' to be more patient.""") except: self._debug("Skipping possible link: %s" % line) elif line.startswith("*"): - line = line[1:].lstrip() + line = line[1:].lstrip("\t ") tmpf.write(textwrap.fill(line, self.options["width"], initial_indent = "• ", subsequent_indent=" ") + "\n") elif line.startswith("###"): - line = line[3:].lstrip() + line = line[3:].lstrip("\t ") tmpf.write("\x1b[4m" + line + "\x1b[0m""\n") elif line.startswith("##"): - line = line[2:].lstrip() + line = line[2:].lstrip("\t ") tmpf.write("\x1b[1m" + line + "\x1b[0m""\n") elif line.startswith("#"): - line = line[1:].lstrip() + line = line[1:].lstrip("\t ") tmpf.write("\x1b[1m\x1b[4m" + line + "\x1b[0m""\n") else: tmpf.write(textwrap.fill(line, self.options["width"]) + "\n")