Add test cases for certain combinations of wikitext features

Document the status quo. This is relevant for the next two patches.

Change-Id: I7907b4743b4dec60c6523dfcc210d947926161be
This commit is contained in:
thiemowmde 2023-11-21 12:27:55 +01:00
parent 59d83e4c9c
commit 8274034243

View file

@ -75,6 +75,16 @@
input: '{{#if: | {{some template\n<!-- comment --> }} }}',
output: '<pre><span><span class="cm-mw-ext-ground cm-mw-parserfunction-bracket">{{</span><span class="cm-mw-ext-ground cm-mw-parserfunction-name">#if</span><span class="cm-mw-ext-ground cm-mw-parserfunction-delimiter">:</span><span class="cm-mw-ext-ground cm-mw-parserfunction"> </span><span class="cm-mw-ext-ground cm-mw-parserfunction-delimiter">|</span><span class="cm-mw-ext-ground cm-mw-parserfunction"> </span><span class="cm-mw-template-ext-ground cm-mw-template-bracket">{{</span><span class="cm-mw-template-ext-ground cm-mw-template-name cm-mw-pagename">some template</span></span></pre><pre><span><span class="cm-mw-template-ext-ground cm-mw-comment">&lt;!-- comment --&gt;</span><span class="cm-mw-template-ext-ground cm-mw-template-bracket"> }}</span><span class="cm-mw-ext-ground cm-mw-parserfunction"> </span><span class="cm-mw-ext-ground cm-mw-parserfunction-bracket">}}</span></span></pre>'
},
{
title: 'T108450: template transclusion where the template name is a parameter',
input: '{{{{{1}}}|…}}',
output: '<pre><span><span class="cm-mw-template-ground cm-mw-template-bracket">{{</span><span class="cm-mw-template-ground cm-mw-templatevariable-bracket">{{{</span><span class="cm-mw-template-ground cm-mw-templatevariable-name">1</span><span class="cm-mw-template-ground cm-mw-templatevariable-bracket">}}}</span><span class="cm-mw-template-ground cm-mw-template-delimiter">|</span><span class="cm-mw-template-ground cm-mw-template">…</span><span class="cm-mw-template-ground cm-mw-template-bracket">}}</span></span></pre>'
},
{
title: 'T292967: table syntax where all | are escaped with the {{!}} parser function',
input: '{{{!}}\n{{!}}-\n{{!}}}',
output: '<pre><span><span class="cm-mw-templatevariable-bracket">{{{</span><span class="cm-mw-templatevariable-name">!}}</span></span></pre><pre><span><span class="cm-mw-templatevariable-name">{{!}}-</span></span></pre><pre><span><span class="cm-mw-templatevariable-name">{{!</span><span class="cm-mw-templatevariable-bracket">}}}</span></span></pre>'
},
{
title: 'section headings',
input: '== My section ==\nFoo bar\n=== Blah ===\nBaz\n= { =\nText',