mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/CodeMirror
synced 2024-11-30 17:04:14 +00:00
Highlight match end tag with different capitalization
This recoginizes <ref></Ref> Bug: T179321 Change-Id: Ib1e501f97654a019281eddd6cc69ea3b979daec7
This commit is contained in:
parent
5579001506
commit
d1a3e49265
|
@ -467,7 +467,7 @@
|
||||||
var origString = false,
|
var origString = false,
|
||||||
from = stream.pos,
|
from = stream.pos,
|
||||||
to,
|
to,
|
||||||
pattern = new RegExp( '</' + name + '\\s*>' ),
|
pattern = new RegExp( '</' + name + '\\s*>', 'i' ),
|
||||||
m = pattern.exec( from ? stream.string.slice( from ) : stream.string );
|
m = pattern.exec( from ? stream.string.slice( from ) : stream.string );
|
||||||
|
|
||||||
if ( m ) {
|
if ( m ) {
|
||||||
|
|
|
@ -85,6 +85,13 @@
|
||||||
title: 'signatures',
|
title: 'signatures',
|
||||||
input: 'my sig ~~~ ~~~~ ~~~~~~~',
|
input: 'my sig ~~~ ~~~~ ~~~~~~~',
|
||||||
output: '<pre class=" CodeMirror-line " role="presentation"><span role="presentation">my sig <span class="cm-mw-signature">~~~</span> <span class="cm-mw-signature">~~~~</span> <span class="cm-mw-signature">~~~~~</span>~~</span></pre>'
|
output: '<pre class=" CodeMirror-line " role="presentation"><span role="presentation">my sig <span class="cm-mw-signature">~~~</span> <span class="cm-mw-signature">~~~~</span> <span class="cm-mw-signature">~~~~~</span>~~</span></pre>'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'new',
|
||||||
|
input: '<ref></Ref>',
|
||||||
|
output: mw.loader.getState( 'ext.cite.styles' ) ?
|
||||||
|
'<pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-mw-exttag-bracket cm-mw-ext-ref"><</span><span class="cm-mw-exttag-name cm-mw-ext-ref">ref</span><span class="cm-mw-exttag-bracket cm-mw-ext-ref">></</span><span class="cm-mw-exttag-name cm-mw-ext-Ref">Ref</span><span class="cm-mw-exttag-bracket cm-mw-ext-Ref">></span></span></pre>' :
|
||||||
|
'<pre class=" CodeMirror-line " role="presentation"><span role="presentation"><ref></Ref></span></pre>'
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue