Module talk:Delink: Difference between revisions

Content deleted Content added
Tags: Reverted Mobile edit Mobile web edit
 
(3 intermediate revisions by 3 users not shown)
Line 13:
:That's a neat trick! It's certainly better than the character-by-character concatenation mess that I created. We should be able to increase the performance further by using the Lua string library rather than the mw.ustring library where possible. Using mw.ustring has the drawback of having to cross back and forth between Lua and PHP all the time, which reduces the performance by quite a bit. Also, your version has some regressions in dealing with interwiki links, but that should be fixed easily enough. I'll have a look and see if I can improve it. Best — '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr. Stradivarius</span>]]''''' <sup>[[User talk:Mr. Stradivarius|♪ talk ♪]]</sup> 14:51, 17 April 2014 (UTC)
 
::I've notice that calling a simple function from mw.stringustring is also about 10 times slower than calling the same function from string, but I do not know what can be replace without risk, and to be able to mesure this difference I run the same function 1 million times, so I just keep mw.stringustring for know.
::I'd be glad to know the regressions. I've tried to deep the same result, except when I notice Mediawiki did not give the same result the delink function. My goal was to have the same text as seen on screen (even if there is brackets).
::[[User:Zebulon84|Zebulon84]] ([[User talk:Zebulon84|talk]]) 19:56, 17 April 2014 (UTC)
Line 134:
* See simple example: {{tlx|Delink|<nowiki>[[Name?]]</nowiki>}} -> {{Delink|[[Name?]]}}
* Real use case: {{tlx|Delink|<nowiki>[[What If...? (TV series)|What If...?]]</nowiki>}} -> {{Delink|[[What If...? (TV series)|What If...?]]}} [[User:Gonnym|Gonnym]] ([[User talk:Gonnym|talk]]) 10:10, 29 September 2021 (UTC)
 
:@[[User:Gonnym|Gonnym]] I see that the issue was solved by adding a second condition [[Special:Permalink/1208348327#L-84|at line 84]]. However question marks are getting matched at that line only because the pattern includes an invisible control character (U+007F). I assume it was added by mistake and it can be removed along with the second condition [[User:Sakretsu|Sakretsu]] ([[User talk:Sakretsu|talk]]) 14:56, 31 March 2024 (UTC)
 
== Performance enhancement? ==
Line 143 ⟶ 145:
I believe this to be a helpful improvement
[[User:Desb42|Desb42]] ([[User talk:Desb42|talk]]) 07:01, 30 April 2022 (UTC)
 
== Template-protected edit request on 5 August 2022 ==
 
{{edit template-protected|Module:Delink|answered=no}}
[[User:Zuperxiddig1996|Zuperxiddig1996]] ([[User talk:Zuperxiddig1996|talk]]) 12:37, 5 August 2022 (UTC)