diff options
author | href <href@random.sh> | 2019-01-24 16:15:13 +0100 |
---|---|---|
committer | href <href@random.sh> | 2019-01-24 16:53:14 +0100 |
commit | a3ba72d97849ba12a5ea4008bd0b97e80bdd588b (patch) | |
tree | d340fb1e26ea74ff89f840783334e81446c0f1c8 /lib | |
parent | be43aa2875e08cd48b10fc0157d71239f098d1e4 (diff) | |
download | pleroma-a3ba72d97849ba12a5ea4008bd0b97e80bdd588b.tar.gz |
Fix clippy with one/five lines
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pleroma/clippy.ex | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/lib/pleroma/clippy.ex b/lib/pleroma/clippy.ex index 5e82ed8e2..4e9bdbe19 100644 --- a/lib/pleroma/clippy.ex +++ b/lib/pleroma/clippy.ex @@ -25,7 +25,7 @@ defmodule Pleroma.Clippy do "Pleroma can federate to the Dark Web!\n - Tor: https://git.pleroma.social/pleroma/pleroma/wikis/Easy%20Onion%20Federation%20(Tor) - i2p: https://git.pleroma.social/pleroma/pleroma/wikis/I2p%20federation", - "Lists of Pleroma instances are available at:\n\n- http://distsn.org/pleroma-instances.html\n- https://fediverse.network/pleroma\n- https://the-federation.info/pleroma", + "Lists of Pleroma instances:\n\n- http://distsn.org/pleroma-instances.html\n- https://fediverse.network/pleroma\n- https://the-federation.info/pleroma", "Pleroma uses the LitePub protocol - https://litepub.social", "To receive more federated posts, subscribe to relays!\n - How-to: https://git.pleroma.social/pleroma/pleroma/wikis/Admin%20tasks#relay-managment @@ -90,6 +90,17 @@ defmodule Pleroma.Clippy do noclippy_line: noclippy_line } + # surrond one/five line clippy with blank lines around to not fuck up the layout + # + # yes this fix sucks but it's good enough, have you ever seen a release of windows wihtout some butched + # features anyway? + lines = + if length(lines) == 1 or length(lines) == 5 do + [""] ++ lines ++ [""] + else + lines + end + clippy_line(lines, clippy_lines, env) rescue e -> |