Blissful690
Loves Misty
I agree with the whole complex filter thing. It would save me having to look at my filter and seeing which line in the complex hidden filter is causing the image to be hidden.
artist:foo
-> artist:foo
something:else
-> something:else
(not a known namespace)artist:foobar (someone:else)
-> artist:foobar (someone:else)
(only the first occurrence is fixed)artist : foo
-> artist:foo
artist: foo
-> artist:foo
artist :foo
-> artist:foo
foo : bar
-> foo : bar
(again, not a known namespace)foo : bar (something: else)
-> foo:bar (something: else)
(again, only the first occurrence is fixed)>>artist:badumsquish
https:\/\/derpicdn\.net\/(?:.+)(?:\/\d+){3}\/(\d{1,7})
.+
will eat all content from the start of the first until the end of the last. I haven’t been able to modify the regexp to be less greedy. This is why it should be only used to detect the presence of hotlinks. If the regexp could be fixed, then it could be used to actually rewrite the hotlinks with embeds. A regexp that matches the full hotlink URL is very complex and I do not want to post it here, as it scares me. I’ve tested it and it works, but it suffers from the same greediness, so it can be very destructive. I believe the best place for actually rewriting the links is in the Markdown parser, as it knows the exact start and end position of all URLs.https://derpibooru.org/images/3122202
, that some people try to use and even put them in ![] sometimes. But that can be fixed.)simple background
or /tags/oc-colon-oc -> oc:oc
The fact that people get mad when you tell them to use proper on-site embeds is all the more reason to make the corrections a silent substitution after they hit submit instead of a validation warning.
>>"riding a pony"
!t[riding a pony]
the first.+
will eat all content from the start of the first until the end of the last. I haven’t been able to modify the regexp to be less greedy
.+?
/(?:https?:\/\/)?derpicdn\.net\/(?:.+?)(?:\/\d+){3}\/(\d+)/i
Example on regex101(?:!\[.*?\])?\(?(?:https:\/\/)?derpicdn\.net\/(?:.+?)(?:\/\d+){3}\/(\d+).*?(?:png|jpe?g|gif|svg|webm)\)?
![x](https://derpicdn.net/img/2023/2/1/3038109/large.jpg)
![x](https://derpicdn.net/img/view/2023/2/1/3038109__safe_artist-colon-pabbley_rainbow+dash_human_pegasus_pony_blushing_clothes_cute_dashabetes_female_floating+heart_goggles_goggles+on+head_hand_hand+on+f.jpg)
https://derpicdn.net/img/view/2023/2/1/3038109__safe_artist-colon-pabbley_rainbow+dash_human_pegasus_pony_blushing_clothes_cute_dashabetes_female_floating+heart_goggles_goggles+on+head_hand_hand+on+f.jpg
https://derpicdn.net/img/2023/2/1/3038109/large.jpg
(?:\[.*?\])?\(?(?:https:\/\/)?(?:derpibooru|trixiebooru)\.org\/images\/(\d+)(?:\S*)
https://derpibooru.org/images/3015554
[x](https://derpibooru.org/images/3015554)
https://derpibooru.org/images/3069967?q=twiabetes%2C+pt%2C+score.gt%3A500%2C+safe
BTW, it looks like embedding images ends links at the image even if more things are within the link syntax:
#safe
, or #[twilight sparkle]
. It wasn’t a priority in the initial Markdown implementation.https://www.deviantart.com/username/art/Name-of-art-1111111
and https://username.deviantart.com/art/Name-of-art-1111111
and http://fav.me/d{base 36 representation of 1111111}
instead of allowing all to exist (such as can happen when merging dupes)?Help fund the $15 daily operational cost of Derpibooru - support us financially!