diff --git a/resources/mode/mediawiki/mediawiki.js b/resources/mode/mediawiki/mediawiki.js index 5f4d6add..37ef1e70 100644 --- a/resources/mode/mediawiki/mediawiki.js +++ b/resources/mode/mediawiki/mediawiki.js @@ -751,7 +751,7 @@ state.stack.push( state.tokenize ); state.tokenize = inVariable; return makeLocalStyle( 'mw-templatevariable-bracket', state ); - } else if ( stream.match( /^\{[\s\u00a0]*/ ) ) { + } else if ( stream.match( /^{(?!{(?!{))[\s\u00a0]*/ ) ) { if ( stream.peek() === '#' ) { // Parser function state.nExt++; state.stack.push( state.tokenize ); diff --git a/resources/mode/mediawiki/tests/qunit/CodeMirror.mediawiki.test.js b/resources/mode/mediawiki/tests/qunit/CodeMirror.mediawiki.test.js index 0964cc93..ecf079d2 100644 --- a/resources/mode/mediawiki/tests/qunit/CodeMirror.mediawiki.test.js +++ b/resources/mode/mediawiki/tests/qunit/CodeMirror.mediawiki.test.js @@ -83,7 +83,7 @@ { title: 'T292967: table syntax where all | are escaped with the {{!}} parser function', input: '{{{!}}\n{{!}}-\n{{!}}}', - output: '
{{{!}}
{{!}}-
{{!}}}
'
+ output: '{{{!}}
{{!}}-
{{!}}}
'
},
{
title: 'section headings',