From a082105ab8f50602b722370422117f50bb095a82 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Sat, 11 Jun 2022 11:56:16 +0200 Subject: [PATCH] remove weird trailing tabs --- files/classes/comment.py | 4 ++-- files/helpers/sanitize.py | 4 ++-- files/routes/posts.py | 6 +++--- files/templates/comments.html | 8 ++++---- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/files/classes/comment.py b/files/classes/comment.py index 8d81ad83b..08c6d93db 100644 --- a/files/classes/comment.py +++ b/files/classes/comment.py @@ -388,7 +388,7 @@ class Comment(Base): if v: body += f''' onchange="poll_vote('{c.id}', '{self.id}')"''' else: body += f''' onchange="poll_vote_no_v('{c.id}', '{self.id}')"''' body += f'''>' if self.choices: @@ -401,7 +401,7 @@ class Comment(Base): body += f'''
' if self.author.sig_html and (self.author_id == MOOSE_ID or (not self.ghost and not (v and v.sigs_disabled))): diff --git a/files/helpers/sanitize.py b/files/helpers/sanitize.py index 55ba04faf..44e123f02 100644 --- a/files/helpers/sanitize.py +++ b/files/helpers/sanitize.py @@ -114,7 +114,7 @@ def callback(attrs, new=False): if not href.startswith('/') and not href.startswith(f'{SITE_FULL}/'): attrs[(None, "target")] = "_blank" - attrs[(None, "rel")] = "nofollow noopener noreferrer" + attrs[(None, "rel")] = "nofollow noopener noreferrer" return attrs @@ -397,4 +397,4 @@ def normalize_url(url): url = imgur_regex.sub(r'\1_d.webp?maxwidth=9999&fidelity=high', url) url = giphy_tenor_regex.sub(r'\1.webp', url) - return url \ No newline at end of file + return url diff --git a/files/routes/posts.py b/files/routes/posts.py index 8d94a4655..f3687b865 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -1085,7 +1085,7 @@ def submit_post(v, sub=None): name2 = name.replace('.webp', 'r.webp') copyfile(name, name2) - post.thumburl = process_image(v.patron, name2, resize=100) + post.thumburl = process_image(v.patron, name2, resize=100) elif file.content_type.startswith('video/'): value = process_video(file) if type(value) is str: post.url = value @@ -1212,7 +1212,7 @@ def submit_post(v, sub=None): newposturl = post.url if newposturl.startswith('/'): newposturl = f"{SITE_FULL}{newposturl}" - body += f"Snapshots:\n\n{rev}* [archive.org](https://web.archive.org/{newposturl})\n* [archive.ph](https://archive.ph/?url={quote(newposturl)}&run=1) (click to archive)\n* [ghostarchive.org](https://ghostarchive.org/search?term={quote(newposturl)}) (click to archive)\n\n" + body += f"Snapshots:\n\n{rev}* [archive.org](https://web.archive.org/{newposturl})\n* [archive.ph](https://archive.ph/?url={quote(newposturl)}&run=1) (click to archive)\n* [ghostarchive.org](https://ghostarchive.org/search?term={quote(newposturl)}) (click to archive)\n\n" gevent.spawn(archiveorg, newposturl) captured = [] @@ -1224,7 +1224,7 @@ def submit_post(v, sub=None): if not href: continue title = i.group(2) - if "Snapshots:\n\n" not in body: body += "Snapshots:\n\n" + if "Snapshots:\n\n" not in body: body += "Snapshots:\n\n" if f'**[{title}]({href})**:\n\n' not in body: body += f'**[{title}]({href})**:\n\n' diff --git a/files/templates/comments.html b/files/templates/comments.html index 078b4e47e..74f9bfe64 100644 --- a/files/templates/comments.html +++ b/files/templates/comments.html @@ -230,7 +230,7 @@ {% if c.treasure_amount.startswith('l') %} treasure Found {{c.treasure_amount.replace('l', '')}} Lottershe Tickets! - {% elif '-' in c.treasure_amount %} + {% elif '-' in c.treasure_amount %} treasure A Mimic Ate {{c.treasure_amount.replace('-', '')}} Coins! {% else %} @@ -281,7 +281,7 @@ 25% {transform: rotate({{c.award_count("tilt")/4}}deg);} 75% {transform: rotate(-{{c.award_count("tilt")/4}}deg);} 100% {transform: rotate(0deg);} - } + } } .comment-{{c.id}}-only { animation-name: c{{c.id}}-tilt !important; @@ -602,12 +602,12 @@ {% if request.path == '/notifications' and c.level == 1 and c.sentto and not c.parent_submission and c.author_id not in (NOTIFICATIONS_ID, AUTOJANNY_ID) %} Reply
-