Content deleted Content added
(8 intermediate revisions by 8 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.
::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 128:
:{{delink|[http://www.example.com HTML line breaks] between<br>two [http://www.example.com links]}}
:Please try again. – [[User:Jonesey95|Jonesey95]] ([[User talk:Jonesey95|talk]]) 02:52, 18 August 2020 (UTC)
== A link with a question mark does not get delinked ==
A link with a question mark does not get delinked.
* 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? ==
I have made a few changes to the /sandbox version
# delinkLinkClass now searches forward for the next '[' rather than one char at a time
# a check in _delink is made for the existence of '[' as Module:Delink is called often without any links to delink (eg 2018–19_UEFA_Europa_League_qualifying_phase_and_play-off_round_(Main_Path))
# in function getDelinkedLabel a check is made for the 'colon trick' - it will be the third byte or not at all
I believe this to be a helpful improvement
[[User:Desb42|Desb42]] ([[User talk:Desb42|talk]]) 07:01, 30 April 2022 (UTC)
|