Page MenuHomePhabricator

Reply tool should not prefix template parameters or extension tag contents with colons
Closed, DuplicatePublic

Description

Report #1

In this edit I used the {{SPARQL}} template, which accepts a potentially multi-line SPARQL query as its parameter. The reply tool prefixed all lines with two colons according to its indentation level, which broke the SPARQL syntax. I think templates either take care of producing an output wiki markup that is usable in indented comments, or are highly likely to be broken anyway if they start in an indented line (as is the case in T241388), so skipping everything within templates will most probably break nothing compared to the current situation, while it will fix templates like {{SPARQL}}.

Report #2

Try to paste this in the Reply Tool textaera:

<syntaxhighlight lang="css">.nomobile {
    display: none !important;
}</syntaxhighlight>

Expected result:
The source code is correctly formatted by the SyntaxHighlight extension.

What really happens:
The preview and the final submitted wikitext does not match the wikitext typed by the editor (: added at the begining of each line within the syntaxhighlight tag).

Example.

Event Timeline

Tacsipacsi renamed this task from Reply tool should not prefix template parameters with colons to Reply tool should not prefix template parameters or extension tags with colons.May 24 2020, 9:47 PM
Tacsipacsi updated the task description. (Show Details)
Tacsipacsi renamed this task from Reply tool should not prefix template parameters or extension tags with colons to Reply tool should not prefix template parameters or extension tag contents with colons.May 26 2020, 1:24 AM

My problem seems described in T251633, I think you can remove it from this ticket. Maybe I need to remerge in this one...

While extension tags are not the same as templates, I think the task is essentially the same (exempt content between A and B from the indentation), only the regexes differ a bit. Maybe this whole task should be merged in T251633?