mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/CodeMirror
synced 2024-09-24 10:48:22 +00:00
Merge "Don't match // as protocol unless used in a link"
This commit is contained in:
commit
0e4bb8feb6
|
@ -643,7 +643,7 @@
|
|||
}
|
||||
|
||||
if ( sol ) {
|
||||
if ( stream.match( urlProtocols ) ) { // highlight free external links, bug T108448
|
||||
if ( !stream.match( '//', false ) && stream.match( urlProtocols ) ) { // highlight free external links, bug T108448
|
||||
state.stack.push( state.tokenize );
|
||||
state.tokenize = eatFreeExternalLink;
|
||||
return makeLocalStyle( 'mw-free-extlink-protocol', state );
|
||||
|
@ -841,7 +841,7 @@
|
|||
default:
|
||||
if ( /[\s\u00a0]/.test( ch ) ) {
|
||||
stream.eatSpace();
|
||||
if ( stream.match( urlProtocols, false ) ) { // highlight free external links, bug T108448
|
||||
if ( stream.match( urlProtocols, false ) && !stream.match( '//' ) ) { // highlight free external links, bug T108448
|
||||
state.stack.push( state.tokenize );
|
||||
state.tokenize = eatFreeExternalLinkProtocol;
|
||||
return makeStyle( style, state );
|
||||
|
|
Loading…
Reference in a new issue