Fix links spacing

Reviewed-by: Kucerak, Kristian <kristian.kucerak@t-systems.com>
Co-authored-by: gtema <artem.goncharov@gmail.com>
Co-committed-by: gtema <artem.goncharov@gmail.com>
This commit is contained in:
gtema 2022-10-17 13:31:21 +00:00 committed by zuul
parent 4cfecba474
commit d254eb5c6f

View File

@ -447,6 +447,9 @@ class OTCDocConvertor:
# continue
logging.info(f"Pre-Processing {f} as {target}")
content = reader.read()
# Preprocess - Fix space inside link and not text
# i.e. `<p>Some <a>link </a>in text</p>
content = re.sub(r"\s</a>", "</a> ", content)
soup = bs4.BeautifulSoup(content, "lxml")
proc = self.streamline_html(soup, f.name)