aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Numerlor <[email protected]>2020-12-12 04:44:37 +0100
committerGravatar Numerlor <[email protected]>2021-01-09 20:10:54 +0100
commitfdc24cf48fcd34b14098befc36bb3d4ce768dccd (patch)
tree835e81b490e255391a95c3ccb8981c75c112c225
parentUse cancel_all instead of manually calling cancel repeatedly (diff)
Strip whitespace from symbol Markdown before returning it
The html we parse frequently ends up with trailing and sometimes leading newlines which get stripped out by discord anyway, we have no reason to keep those around when sending the Markdown over to redis
-rw-r--r--bot/exts/info/doc/_parsing.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/bot/exts/info/doc/_parsing.py b/bot/exts/info/doc/_parsing.py
index 567786204..521034006 100644
--- a/bot/exts/info/doc/_parsing.py
+++ b/bot/exts/info/doc/_parsing.py
@@ -345,4 +345,4 @@ def get_symbol_markdown(soup: BeautifulSoup, symbol_data: DocItem) -> Optional[s
else:
signature = _get_signatures(symbol_heading)
description = _get_dd_description(symbol_heading)
- return _create_markdown(signature, description, symbol_data.url).replace('¶', '')
+ return _create_markdown(signature, description, symbol_data.url).replace('¶', '').strip()