Highlight match end tag with different capitalization

This recoginizes <ref></Ref>

Bug: T179321
Change-Id: Ib1e501f97654a019281eddd6cc69ea3b979daec7
This commit is contained in:
Derk-Jan Hartman 2019-04-13 23:44:50 +02:00
parent 5579001506
commit d1a3e49265
2 changed files with 8 additions and 1 deletions

View file

@ -467,7 +467,7 @@
var origString = false,
from = stream.pos,
to,
pattern = new RegExp( '</' + name + '\\s*>' ),
pattern = new RegExp( '</' + name + '\\s*>', 'i' ),
m = pattern.exec( from ? stream.string.slice( from ) : stream.string );
if ( m ) {

View file

@ -85,6 +85,13 @@
title: 'signatures',
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>'
},
{
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">&lt;</span><span class="cm-mw-exttag-name cm-mw-ext-ref">ref</span><span class="cm-mw-exttag-bracket cm-mw-ext-ref">&gt;&lt;/</span><span class="cm-mw-exttag-name cm-mw-ext-Ref">Ref</span><span class="cm-mw-exttag-bracket cm-mw-ext-Ref">&gt;</span></span></pre>' :
'<pre class=" CodeMirror-line " role="presentation"><span role="presentation">&lt;ref&gt;&lt;/Ref&gt;</span></pre>'
}
];