st icon indicating copy to clipboard operation
st copied to clipboard

Fix and simplify st-urlhandle

Open jdujava opened this issue 10 months ago • 1 comments

Improvements:

  • visually simplified regexes by splitting to url and magnet parts
  • properly capture "www.___" urls
  • slightly more robust line concatenation, which preserves the newlines on empty lines -> before, links at the end of the lines would often become corrupted, now at least empty lines can guard the link
  • fixed removing of the ending punctuation (removing "?" did not work previously)

jdujava avatar May 26 '25 17:05 jdujava

is it possible to modify the regex to match the full url when quotations or non-english characters are present? eg:

https://www.youtube.com/results?search_query="test"
https://rateyourmusic.com/artist/루나

2084x avatar Jul 10 '25 02:07 2084x