mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-29 00:30:44 +00:00
Update VE core submodule to master (6e68242)
New changes: c06fa64 Account for isValid() becoming async 12e4840 Account for WhitespacePreservingTextInputWidget#getValue being called early Local changes: * Make MWLinkTargetInputWidget#isValid asynchronous Bug: 71237 Bug: 71246 Change-Id: Iab83e743f99973f01a54b23fd5ddf1081f7effd6
This commit is contained in:
parent
8517777b9f
commit
6347274f47
2
lib/ve
2
lib/ve
|
@ -1 +1 @@
|
|||
Subproject commit 8d5ec7a7e2bdd6ccc45dbbcade7e192875259350
|
||||
Subproject commit 6e68242f8bee29d68fdf5db0289a323024c65b04
|
|
@ -85,11 +85,14 @@ ve.ui.MWLinkTargetInputWidget.prototype.onLookupInputChange = function () {
|
|||
* @inheritdoc
|
||||
*/
|
||||
ve.ui.MWLinkTargetInputWidget.prototype.isValid = function () {
|
||||
var valid;
|
||||
if ( this.annotation instanceof ve.dm.MWExternalLinkAnnotation ) {
|
||||
return this.annotation.getAttribute( 'href' )
|
||||
valid = this.annotation.getAttribute( 'href' )
|
||||
.match( /(^|\s)((https?:\/\/)?[\w-]+(\.[\w-]+)+\.?(:\d+)?(\/\S*)?)/gi );
|
||||
} else {
|
||||
valid = !!this.getValue();
|
||||
}
|
||||
return !!this.getValue();
|
||||
return $.Deferred().resolve( valid ).promise();
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue