mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-30 17:14:42 +00:00
MWLinkAnnotationInspector: Work around annoying syntax highlighting bug in Gerrit
Wrap a regexp in parentheses to avoid confusing Gerrit's New UI syntax highlighter, which goes crazy if a line starts with a regexp. https://github.com/highlightjs/highlight.js/issues/1962 Change-Id: I7e4ca4d5c4d449925af7168147016ed2fb8a6e33
This commit is contained in:
parent
a0aacd89e1
commit
9ba3255c26
|
@ -217,7 +217,7 @@ ve.ui.MWLinkAnnotationInspector.prototype.onInternalLinkInputChange = function (
|
|||
}
|
||||
if (
|
||||
!this.allowProtocolInInternal &&
|
||||
/^(?:[a-z][a-z0-9$\-_@.&!*"'(),]*:)?\/\//i.test( value.trim() )
|
||||
( /^(?:[a-z][a-z0-9$\-_@.&!*"'(),]*:)?\/\//i ).test( value.trim() )
|
||||
) {
|
||||
this.linkTypeIndex.setTabPanel( 'external' );
|
||||
// Changing tabPanel focuses and selects the input, so collapse the cursor back to the end.
|
||||
|
|
Loading…
Reference in a new issue