Merge pull request #2 from EvilDrPurple/revert-1-recognize-whitespace

Revert "Recognize profile summary linebreaks + whitespace"
This commit is contained in:
Kylie 2021-07-31 13:14:00 -04:00 committed by GitHub
commit 27445950b3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 4 deletions

View file

@ -26,8 +26,6 @@ class InputHtmlParser(HTMLParser): # pylint: disable=abstract-method
self.output = []
# if the html appears invalid, we just won't allow any at all
self.allow_html = True
self.output.append(("data", "<style>.show-white-space{white-space:pre-wrap;}</style>"))
self.output.append(("data", "<span class=\"show-white-space\">"))
def handle_starttag(self, tag, attrs):
"""check if the tag is valid"""
@ -58,7 +56,6 @@ class InputHtmlParser(HTMLParser): # pylint: disable=abstract-method
def get_output(self):
"""convert the output from a list of tuples to a string"""
self.output.append(("data", "</span>"))
if self.tag_stack:
self.allow_html = False
if not self.allow_html:

View file

@ -20,7 +20,7 @@
<div>
{% if user.summary %}
{{ user.summary|to_markdown|safe|truncatechars_html:81 }}
{{ user.summary|to_markdown|safe|truncatechars_html:40 }}
{% else %}&nbsp;{% endif %}
</div>
</div>