@@ -205,8 +205,8 @@ CodeMirror.defineMode("xml", function(editorConf, config_) {
205205 return ;
206206 }
207207 parentTagName = state . context . tagName ;
208- if ( ! config . contextGrabbers . hasOwnProperty ( parentTagName ) ||
209- ! config . contextGrabbers [ parentTagName ] . hasOwnProperty ( nextTagName ) ) {
208+ if ( ! config . contextGrabbers . hasOwnProperty ( parentTagName . toLowerCase ( ) ) ||
209+ ! config . contextGrabbers [ parentTagName . toLowerCase ( ) ] . hasOwnProperty ( nextTagName . toLowerCase ( ) ) ) {
210210 return ;
211211 }
212212 popContext ( state ) ;
@@ -240,7 +240,7 @@ CodeMirror.defineMode("xml", function(editorConf, config_) {
240240 if ( type == "word" ) {
241241 var tagName = stream . current ( ) ;
242242 if ( state . context && state . context . tagName != tagName &&
243- config . implicitlyClosed . hasOwnProperty ( state . context . tagName ) )
243+ config . implicitlyClosed . hasOwnProperty ( state . context . tagName . toLowerCase ( ) ) )
244244 popContext ( state ) ;
245245 if ( ( state . context && state . context . tagName == tagName ) || config . matchClosing === false ) {
246246 setStyle = "tag" ;
@@ -279,7 +279,7 @@ CodeMirror.defineMode("xml", function(editorConf, config_) {
279279 var tagName = state . tagName , tagStart = state . tagStart ;
280280 state . tagName = state . tagStart = null ;
281281 if ( type == "selfcloseTag" ||
282- config . autoSelfClosers . hasOwnProperty ( tagName ) ) {
282+ config . autoSelfClosers . hasOwnProperty ( tagName . toLowerCase ( ) ) ) {
283283 maybePopContext ( state , tagName ) ;
284284 } else {
285285 maybePopContext ( state , tagName ) ;
@@ -359,16 +359,16 @@ CodeMirror.defineMode("xml", function(editorConf, config_) {
359359 if ( context . tagName == tagAfter [ 2 ] ) {
360360 context = context . prev ;
361361 break ;
362- } else if ( config . implicitlyClosed . hasOwnProperty ( context . tagName ) ) {
362+ } else if ( config . implicitlyClosed . hasOwnProperty ( context . tagName . toLowerCase ( ) ) ) {
363363 context = context . prev ;
364364 } else {
365365 break ;
366366 }
367367 }
368368 } else if ( tagAfter ) { // Opening tag spotted
369369 while ( context ) {
370- var grabbers = config . contextGrabbers [ context . tagName ] ;
371- if ( grabbers && grabbers . hasOwnProperty ( tagAfter [ 2 ] ) )
370+ var grabbers = config . contextGrabbers [ context . tagName . toLowerCase ( ) ] ;
371+ if ( grabbers && grabbers . hasOwnProperty ( tagAfter [ 2 ] . toLowerCase ( ) ) )
372372 context = context . prev ;
373373 else
374374 break ;
0 commit comments