diff --git a/resources/mode/mediawiki/mediawiki.js b/resources/mode/mediawiki/mediawiki.js index be050ccb..257c9021 100644 --- a/resources/mode/mediawiki/mediawiki.js +++ b/resources/mode/mediawiki/mediawiki.js @@ -467,7 +467,7 @@ var origString = false, from = stream.pos, to, - pattern = new RegExp( '' ), + pattern = new RegExp( '', 'i' ), m = pattern.exec( from ? stream.string.slice( from ) : stream.string ); if ( m ) { diff --git a/resources/mode/mediawiki/tests/qunit/CodeMirror.mediawiki.test.js b/resources/mode/mediawiki/tests/qunit/CodeMirror.mediawiki.test.js index 2f02c75a..5e23e3f6 100644 --- a/resources/mode/mediawiki/tests/qunit/CodeMirror.mediawiki.test.js +++ b/resources/mode/mediawiki/tests/qunit/CodeMirror.mediawiki.test.js @@ -85,6 +85,13 @@ title: 'signatures', input: 'my sig ~~~ ~~~~ ~~~~~~~', output: '' + }, + { + title: 'new', + input: '', + output: mw.loader.getState( 'ext.cite.styles' ) ? + '' : + '' } ];