Topic on Talk:Talk pages project

Unwanted nowiki tags

8
Summary by Whatamidoing (WMF)
Clayoquot (talkcontribs)

Hi. I'm not sure if you've heard this already, but the new tool keeps adding <nowiki> tags when I try to use templates or diffs in a comment. I'm going to go back to Enterprisey's Reply-link tool until this issue is fixed.

Matěj Suchánek (talkcontribs)

You probably have to switch from Visual mode to Source mode.

Whatamidoing (WMF) (talkcontribs)

Templates are disabled in the visual mode because @Lofhi discovered that multi-line templates (such as an infobox) make a mess. You can paste the wikitext code for a template into the visual mode, and it will interpret that as wikitext, but just typing it out will be escaped. This is handy if I want to tell you to type {{thank you}} but not when I actually want to say Thank you.

Templates will be re-enabled for the visual mode after the technical RFC about how wikitext handles multi-line comments is resolved. In the meantime, as Matěj Suchánek says, you can type templates in the wikitext source mode.

Stjn (talkcontribs)

But why was inserting multi-line templates a problem? It seems to me that the fact that DiscussionTools inserts : too liberally is what was the main issue in that task, not the fact that you could insert templates via visual mode. Ideally, DiscussionTool should leverage Parsoid (since it uses it) or some other programming magic to stop inserting sequences of : in parameters and closing brackets, since that was what breaking the code in the first place.

For example, this (adapted from one of their place) is perfectly functioning wikitext right now, without multi-line comments:

::::::::::Weird test:
::::::::::{{Graphique polygonal
| pas_grille_principale = 10
| nb_abscisses = 10
| y_max = 11
| S01V01 = 2200
| lb_x1 = 1
| nb_series = 1
}}
:::::::::[[Category:Page utilisant une frise chronologique]] [[Utilisateur:Lofhi|Lo<i>fhi</i>]] ([[Discussion Utilisateur:Lofhi|me contacter]]) 26 mai 2020 à 18:31 (CEST)

Seems wrong that the chosen route for this was ‘disable multi-line template insertion’ instead of ‘fix how DiscussionTools handles multi-line template invocations’. There are perfectly reasonable use cases where one would want to use wikitext like that, IMO.

Clayoquot (talkcontribs)

Thanks! I eventually found the Source mode and it works well. It would be nice if the editor could detect that you're probably trying to add a template or external link, and ask you if you want to switch to Source mode.

Whatamidoing (WMF) (talkcontribs)

You can add external links in the visual mode.

I'll file a request for a note about switching to Source mode. That's a good idea.

Pelagic (talkcontribs)

Ideally, there would be a way to tag templates as having output that is line-break-safe &/or block-element-safe. This might be useful in other contexts, not just ReplyTool. (Note, this is distinct from Stjn's example above where the template input in source mode is multi-line.)

Whatamidoing (WMF) (talkcontribs)

Getting templates is stalled on making a change (addinig extra syntax) to wikitext, which is blocked on officially starting the technical RFC process. It might be easier just to get that over with than to identify the safe templates.

Reply to "Unwanted nowiki tags"