I am looking for an off-the-shelf method of determining if a template like {{WikiProject Cycling}} lies inside {{WikiProject banner shell}} or any of its redire
| Module:Wikitext Parsing is indefinitely protected from editing as it is a heavily used or highly visible module. Substantial changes should first be proposed and discussed here on this page. If the proposal is uncontroversial or has been discussed and is supported by consensus, editors may use {{edit protected}} to notify an administrator to make the requested edit.
|
| This is the talk page for discussing improvements to the Wikitext Parsing module. |
|
I am looking for an off-the-shelf method of determining if a template like {{WikiProject Cycling}} lies inside {{WikiProject banner shell}} or any of its redirects. Can this module's ParseTemplates function provide this efficiently? — Martin (MSGJ · talk) 09:05, 2 July 2024 (UTC)
:find() on the entirety of WPbs's text if that's available already in your case?). Aidan9382 (talk) 18:51, 2 July 2024 (UTC)
{{WikiProject Cycling ... }} lies in between {{WikiProject banner shell and its closing braces }} or not. This is probably a bit beyond my abilities — Martin (MSGJ · talk) 20:45, 2 July 2024 (UTC)
getTemplate to get the text of a template, which you might already be using or might not be, I'm not sure), surely you could do a :find() on it for {{%s*[Ww]ikiProject Cycling%s*[|}]? This obviously doesn't account for strange scenarios like the template being on the page twice, but I don't think that's something the module should be reasonably expected to handle perfectly since there could be a number of wrong things going on there. Aidan9382 (talk) 20:53, 2 July 2024 (UTC)This edit request to Module:Wikitext Parsing/sandbox has been answered. Set the |answered= parameter to no to reactivate your request. |
Could an admin remove the protection on the sandbox now that the transclusions have finally reset? Aidan9382 (talk) 21:29, 19 May 2025 (UTC)
This edit request has been answered. Set the |answered= parameter to no to reactivate your request. |
This change improves the performance by a bit to try help with long-load-time talk pages like Talk:World War II, as well as cleaning up some of the code and removing the old, unfinished, overkill, and unused ParseTemplates feature (and I say that as the person who wrote it).
The direct sandbox diff is a bit messy, so here are the changes in parts:
Testcase results can be found at Module talk:Wikitext Parsing/testcases and Module talk:Template parameter value/testcases. Aidan9382 (talk) 19:30, 25 July 2026 (UTC)
Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.