:The following discussion is an archived debate. Please do not modify it. To request review of this BRFA, please start a new section at Wikipedia:Bots/Noticeboard. The result of the discussion was {{BotWithdrawn}}
:@Alexis Jazz if the only instances of 'source' on the script are at the top/bottom and the fix is remove: does that resolve that concern? — xaosfluxTalk 11:43, 11 June 2022 (UTC)
::Xaosflux, I suppose, can't think of any problems that approach would cause. I see some uses of source tags where seemingly nowiki was intended instead. Adding nowiki to the top+bottom of Special:Search/incategory:"Pages using deprecated source tags" -insource:nowiki intitle:/\.js/ should be safe I think. That's 217 pages atm. Out of the 84 pages on Special:Search/incategory:"Pages using deprecated source tags" insource:nowiki intitle:/\.js/ some will be caught by your strategy of dealing with source tags that only appear at the top/bottom. Hopefully after that the number of pages left will be low enough to sift through by hand. Actually that's already doable for 84 pages, but if we can drop that a bit further that would be convenient. — Alexis Jazz (talk or ping me) 11:57, 11 June 2022 (UTC)
:::These will still mostly be "by hand", I don't plan on letting this run loose on script pages. — xaosfluxTalk 11:59, 11 June 2022 (UTC)
::::Xaosflux, given what WOSlinker said below, I also oppose removing source tags from the top and bottom as they may currently prevent parsing of whatever is inside. Replacing top source tags with <syntaxhighlight lang="text> and bottom closing source tags with </syntaxhighlight> would be safer in that case. Maybe a regex like /^\/\/[ ]*<[Ss]ource>([^]*)\/\/[ ]*<\/[Ss]ource>$/ (replace with //<nowiki>$1//</nowiki>)? — Alexis Jazz (talk or ping me) 12:22, 11 June 2022 (UTC)
I clicked on a few random pages in that category, 1, 2, 3, 4, all of them have literally no use for syntax highlighting - can we just remove the tags instead of trying to "fix" them? Legoktm (talk) 04:44, 11 June 2022 (UTC)
:I'm a bit concerned over removing them from .js pages, as mentions of it regularly in a string (E.g. console.log("")) or similar will still get it added to the category - its not just in // comments. Aidan9382(talk) 05:19, 11 June 2022 (UTC)
:@Legoktm I'm fine with removing it as well; @Aidan9382 I can expand this slightly to include those cases - so remove if it is in the top/bottom comments, convert if in a log - will that satisfy your concern? — xaosfluxTalk 10:19, 11 June 2022 (UTC)
::I'll be honest, its probably quite a rare edge case. I could imagine you could get away without having to handle an edge case just fine, but if you really wanted to cover it, just (somehow) make sure that the tag isnt inside a string and that'd do a fine enough job - if it is, probably best to replace it instead. Aidan9382(talk) 11:55, 11 June 2022 (UTC)
::If this results in a "just do it on your main account" - this is still good feedback for how to best deal with this one-time thing as well. — xaosfluxTalk 11:00, 11 June 2022 (UTC)
:::On some pages, the source/syntaxhighlight tags are no use but on others, it stops the javascript code transcluding templates and/or being added to categories due to the code on the page. -- WOSlinker (talk) 11:55, 11 June 2022 (UTC)
::::The source tag at top and bottom of the uses javasript page was added in some cases to stop items appearing at Special:WantedTemplates. This could also be done with nowiki instead though. -- WOSlinker (talk) 12:05, 11 June 2022 (UTC)
Rather than replacing with , on .js pages, could we replace with and on .css pages replace with if the lang is not included? -- WOSlinker (talk) 11:51, 11 June 2022 (UTC)
:That certainly makes more sense, assuming we should keep the tag at all. I'm certainly fine with this BRFA being a "what is the best way to deal with this" discussion, there is no urgency on this. — xaosfluxTalk 11:56, 11 June 2022 (UTC)
:WOSlinker, as an empty lang parameter just puts the page in :Category:Pages with syntax highlighting errors that's already better, but actually I'd suggest <syntaxhighlight lang="text"> which is valid and behaves the same as a source tag without lang parameter. None of this stuff is actually visible when viewing these pages. — Alexis Jazz (talk or ping me) 12:07, 11 June 2022 (UTC)
::@Alexis Jazz, for syntaxhighlight in general, so you know what lang should be used for wikitext? I'm aware of tid but I believe there's another. ― Qwerfjkltalk 13:42, 11 June 2022 (UTC)
:::@Qwerfjkl "wikitext" isn't a supported language for syntaxhighlight. And most of these pages actually are js/css; that being said for the pages that actually are js/css here - they are already opening in the js/css editor, and the highlight doesn't render on the page viewer - so they seem a bit useless -- is there any good reason to actually keep these? — xaosfluxTalk 15:03, 11 June 2022 (UTC)
::::Qwerfjkl, see :mw:Extension:SyntaxHighlight#Supported languages. Xaosflux, the highlighting is useless but they prevent templates/links/etc inside from being parsed which could otherwise result in entries in WhatLinksHere, WantedCategories, WantedPages, etc. But lang=text or nowiki works just as well for that. — Alexis Jazz (talk or ping me) 15:51, 11 June 2022 (UTC)
:::::@Alexis Jazz agree, I think remove source tags when "wrapping" the whole page and replacing with nowiki may be the best solution for these user scripts. — xaosfluxTalk 15:59, 11 June 2022 (UTC)
==Arbitrary break / discussion restart==
So... where are we with this? The discussion above has some proposed tweaks and changes but it doesn't sound like any specific resolution was agreed upon. Is this good to go ahead, has the task already been done manually, or is there more to discuss? {{ppor|no}} Primefac (talk) 16:44, 6 August 2022 (UTC)
:Nothing ever moved on this; there are still about 400 of these. As far as a new strategy, I think it's safe to limit this to:
:#userjs and usercss pages
:#that are in js/css/scss content models
:#where the "source" tags are in a comment
:And have the fix be:
:#remove the source tags
:These tags are doing nothing in the comment, and the wikitext editor already uses the markup editor on those pages.
:I can do a couple examples on my own account if that would help? If this is still too contentious, I'll just withdraw - some intadmin (maybe me) will prob get around to these one day when we have nothing else to do :) — xaosfluxTalk 21:53, 6 August 2022 (UTC)
{{BotWithdrawn}} well this has gone nowhere, so just w/d'ing. — xaosfluxTalk 13:58, 29 August 2022 (UTC)
:The above discussion is preserved as an archive of the debate. Please do not modify it. To request review of this BRFA, please start a new section at Wikipedia:Bots/Noticeboard.