diff --git a/src/rocky_man/processor/converter.py b/src/rocky_man/processor/converter.py index 6d82920..c868055 100644 --- a/src/rocky_man/processor/converter.py +++ b/src/rocky_man/processor/converter.py @@ -171,11 +171,27 @@ class ManPageConverter: Returns: Cleaned HTML """ + # Fix empty header cells html = re.sub( r'
\s*
', '', html) + + # Clean up trailing whitespace and br tags in pre blocks + # Match:...and clean trailing
{content}'
+
+ html = re.sub(r'(.*?)', clean_pre_block, html, flags=re.DOTALL) + html = html.strip() return html