mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/CodeMirror
synced 2024-11-23 22:03:28 +00:00
Merge "Don't detect additional { as part of the template name"
This commit is contained in:
commit
64e7054717
|
@ -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 );
|
||||
|
|
|
@ -83,7 +83,7 @@
|
|||
{
|
||||
title: 'T292967: table syntax where all | are escaped with the {{!}} parser function',
|
||||
input: '{{{!}}\n{{!}}-\n{{!}}}',
|
||||
output: '<pre><span><span class="cm-mw-template-ground cm-mw-template-bracket">{{</span><span class="cm-mw-template-ground cm-mw-template-name cm-mw-pagename">{!</span><span class="cm-mw-template-ground cm-mw-template-bracket">}}</span></span></pre><pre><span><span class="cm-mw-ext-ground cm-mw-parserfunction-bracket">{{</span><span class="cm-mw-ext-ground cm-mw-parserfunction-name">!</span><span class="cm-mw-ext-ground cm-mw-parserfunction-bracket">}}</span>-</span></pre><pre><span><span class="cm-mw-ext-ground cm-mw-parserfunction-bracket">{{</span><span class="cm-mw-ext-ground cm-mw-parserfunction-name">!</span><span class="cm-mw-ext-ground cm-mw-parserfunction-bracket">}}</span>}</span></pre>'
|
||||
output: '<pre><span>{<span class="cm-mw-ext-ground cm-mw-parserfunction-bracket">{{</span><span class="cm-mw-ext-ground cm-mw-parserfunction-name">!</span><span class="cm-mw-ext-ground cm-mw-parserfunction-bracket">}}</span></span></pre><pre><span><span class="cm-mw-ext-ground cm-mw-parserfunction-bracket">{{</span><span class="cm-mw-ext-ground cm-mw-parserfunction-name">!</span><span class="cm-mw-ext-ground cm-mw-parserfunction-bracket">}}</span>-</span></pre><pre><span><span class="cm-mw-ext-ground cm-mw-parserfunction-bracket">{{</span><span class="cm-mw-ext-ground cm-mw-parserfunction-name">!</span><span class="cm-mw-ext-ground cm-mw-parserfunction-bracket">}}</span>}</span></pre>'
|
||||
},
|
||||
{
|
||||
title: 'section headings',
|
||||
|
|
Loading…
Reference in a new issue