debian-mirror-gitlab/app/assets/javascripts/jobs/utils.js

13 lines
372 B
JavaScript
Raw Normal View History

2021-02-22 17:27:13 +05:30
/**
* capture anything starting with http:// or https://
* https?:\/\/
*
* up until a disallowed character or whitespace
* [^"<>\\^`{|}\s]+
*
* and a disallowed character or whitespace, including non-ending chars .,:;!?
* [^"<>\\^`{|}\s.,:;!?]
*/
export const linkRegex = /(https?:\/\/[^"<>\\^`{|}\s]+[^"<>\\^`{|}\s.,:;!?])/g;
2021-01-29 00:20:46 +05:30
export default { linkRegex };