mirror of
https://github.com/Eugeny/tabby.git
synced 2026-08-24 02:34:19 -05:00
Fix trailing semicolons in clickable URLs (#11166)
Co-authored-by: lawrence3699 <lawrence3699@users.noreply.github.com>
This commit is contained in:
co-authored by
lawrence3699
parent
02216ff4e7
commit
18bca3ecb6
@@ -12,7 +12,7 @@ import { LinkHandler } from './api'
|
|||||||
export class URLHandler extends LinkHandler {
|
export class URLHandler extends LinkHandler {
|
||||||
// From https://urlregex.com/
|
// From https://urlregex.com/
|
||||||
// with "-" added to last group (https://github.com/Eugeny/tabby/issues/5611)
|
// with "-" added to last group (https://github.com/Eugeny/tabby/issues/5611)
|
||||||
regex = /((([A-Za-z]{3,9}:(?:\/\/)?)(?:[\-;:&=\+\$,\w]+@)?[A-Za-z0-9\.\-]+|(?:www\.|[\-;:&=\+\$,\w]+@)[A-Za-z0-9\.\-]+)((:((6553[0-5])|(655[0-2][0-9])|(65[0-4][0-9]{2})|(6[0-4][0-9]{3})|([1-5][0-9]{4})|([0-5]{1,5})|([0-9]{1,4})))?(?:\/[\+~%\/\.\w\-_]*)?\??(?:[\-\+=&;%@\.\w_]*)#?(?:[\.\!\/\\\w-]*))?)/
|
regex = /((([A-Za-z]{3,9}:(?:\/\/)?)(?:[\-;:&=\+\$,\w]+@)?[A-Za-z0-9\.\-]+|(?:www\.|[\-;:&=\+\$,\w]+@)[A-Za-z0-9\.\-]+)((:((6553[0-5])|(655[0-2][0-9])|(65[0-4][0-9]{2})|(6[0-4][0-9]{3})|([1-5][0-9]{4})|([0-5]{1,5})|([0-9]{1,4})))?(?:\/[\+~%\/\.\w\-_]*)?\??(?:[\-\+=&;%@\.\w_]*)#?(?:[\.\!\/\\\w-]*))?)(?<!;)/
|
||||||
|
|
||||||
priority = 5
|
priority = 5
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user