Avoid overlong regex line in javascript.
The regex line in this javascript was > 256 characters, which triggers
the following warning from debian's "lintian" source-checking tool:
https://lintian.debian.org/tags/source-is-missing.html
https://lintian.debian.org/tags/source-contains-prebuilt-javascript-object.html
This offers no functional change, but avoids some needless warnings
going forward.
This commit is contained in:
parent
6642693931
commit
74e37a46cc
1 changed files with 3 additions and 1 deletions
|
|
@ -18,7 +18,9 @@ ComposerPageState.QUOTE_MARKER = "\x7f"; // delete
|
|||
ComposerPageState.PROTOCOL_REGEX = /^(aim|apt|bitcoin|cvs|ed2k|ftp|file|finger|git|gtalk|http|https|irc|ircs|irc6|lastfm|ldap|ldaps|magnet|news|nntp|rsync|sftp|skype|smb|sms|svn|telnet|tftp|ssh|webcal|xmpp):/i;
|
||||
// Taken from Geary.HTML.URL_REGEX, without the inline modifier (?x)
|
||||
// at the start, which is unsupported in JS
|
||||
ComposerPageState.URL_REGEX = new RegExp("\\b((?:[a-z][\\w-]+:(?:/{1,3}|[a-z0-9%])|www\\d{0,3}[.]|[a-z0-9.\\-]+[.][a-z]{2,4}/)(?:[^\\s()<>]+|\\(([^\\s()<>]+|(\\([^\\s()<>]+\\)))*\\))+(?:\\(([^\\s()<>]+|(\\([^\\s()<>]+\\)))*\\)|[^\\s`!()\\[\\]{};:'\".,<>?«»“”‘’]))", "gi");
|
||||
ComposerPageState.URL_REGEX = new RegExp("\\b((?:[a-z][\\w-]+:(?:/{1,3}|[a-z0-9%])|www\\d{0,3}[.]|[a-z0-9.\\-]+[.][a-z]{2,4}/)"+
|
||||
"(?:[^\\s()<>]+|\\(([^\\s()<>]+|(\\([^\\s()<>]+\\)))*\\))+"+
|
||||
"(?:\\(([^\\s()<>]+|(\\([^\\s()<>]+\\)))*\\)|[^\\s`!()\\[\\]{};:'\".,<>?«»“”‘’]))", "gi");
|
||||
|
||||
ComposerPageState.prototype = {
|
||||
__proto__: PageState.prototype,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue