mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-12 09:09:25 +00:00
Merge "Modify regex to allow section links as valid titles"
This commit is contained in:
commit
3f7761d242
|
@ -87,9 +87,13 @@ ve.ui.MWLinkInspector.prototype.getAnnotationFromText = function ( target ) {
|
|||
/**
|
||||
* Regular expression matching a valid internal link
|
||||
*
|
||||
* This is a slightly modified version of the PHP regex
|
||||
* - unicode range changed from 0080-00ff to 0080-ffff
|
||||
* - added '(#.*)?' to allow section links
|
||||
*
|
||||
* @type {RegExp}
|
||||
*/
|
||||
ve.ui.MWLinkInspector.static.legalTitle = /^[ %!"$&'()*,\-.\/0-9:;=?@A-Z\\^_`a-z~\u0080-\uFFFF+]+$/;
|
||||
ve.ui.MWLinkInspector.static.legalTitle = /^[ %!"$&'()*,\-.\/0-9:;=?@A-Z\\^_`a-z~\u0080-\uFFFF+]+(#.*)?$/;
|
||||
|
||||
/* Registration */
|
||||
|
||||
|
|
Loading…
Reference in a new issue