Anonymous
Not logged in
Talk
Contributions
Create account
Log in
Tales from Chyria
Search
Editing
Module talk:Hatnote
(section)
From Tales from Chyria
Namespaces
Module
Discussion
More
More
Page actions
Read
Edit source
New topic
History
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Replace underscores with spaces == It would be helpful if the <code>_formatLink</code> function would automatically replace underscores with spaces. Ideally people would always insert links with spaces, but that doesn't always happen; see {{oldid2|767159247|Proto-Slavic basis of Slovak|this section}} in the current revision of [[History of the Slovak language]]. Both the page name and the section have underscores and it looks terrible. This would be avoided if the module always displayed spaces. I've made the roughly equivalent function on Wiktionary do this (the <code>section_link</code> function in [[wikt:Module:links|Module:links]]). ā [[User:Erutuon|Eru]]Ā·[[User talk:Erutuon|tuon]] 17:53, 21 July 2017 (UTC) * It's not the responsibility of templates and modules to fix ''every potential issue'' with input. There exist titles that canonically contain underscores, and linking those in hatnotes should not require working around the functionality of this module. If someone leaves underscores in a link inappropriately, the solution is to edit ''that link'' and replace them with spaces. <span style="white-space:nowrap;">{{[[User:Nihiltres|<span style="color:#233D7A;">Nihiltres</span>]] |[[User talk:Nihiltres|talk]] |[[Special:Contributions/Nihiltres|edits]]}}</span> 19:39, 25 June 2018 (UTC) *:I would lean the other way on this one. The number of "crap links" that have pointless underscores still in them is many orders of magnitude larger than the number of titles that technically should have an underscore (and they'll work without one anyway). That is, the amount of editorial time wasted cleaning up links manually to remove unwanted underscores will dwarf the time spent manually adding one for a weird title, probably on the order millions to one. And it's surely the no. 1 bit of link cleanup we do, by a very wide margin. <span style="white-space:nowrap;font-family:'Trebuchet MS'">āāāÆ[[User:SMcCandlish|'''SMcCandlish''']] [[User talk:SMcCandlish|ā]] [[Special:Contributions/SMcCandlish|Ā¢]]āš¼ā</span> 03:27, 26 June 2018 (UTC) *:{{ping|Nihiltres|Erutuon}} Agreed with {{u|SMcCandlish}}. If my open [[WP:ER]] is accepted, I'll make another one implementing this. [[User:PsiÄ„edelisto|PsiÄ„edelisto]] ([[User talk:PsiÄ„edelisto|talk]] ⢠[[Special:Contributions/PsiÄ„edelisto|contribs]]) <sup>please ''always'' [[Help:Notifications|ping]]!</sup> 09:53, 13 June 2020 (UTC) *::OhāI should clarify before it's too lateāeither I'd add it as an optional parameter, e.g. <code>_=r</code> (read as "underscores equals replace"), or, do research into how many instances of underscores would need to be manually checked, and commit to checking them all. Definitely I won't open a template-protected edit request that will change the default behavior without knowing all the effects this will have, and having a plan for those. So don't worry about that {{u|Nihiltres}}. {{=3|8}} [[User:PsiÄ„edelisto|PsiÄ„edelisto]] ([[User talk:PsiÄ„edelisto|talk]] ⢠[[Special:Contributions/PsiÄ„edelisto|contribs]]) <sup>please ''always'' [[Help:Notifications|ping]]!</sup> 01:40, 14 June 2020 (UTC) **{{ping|PsiÄ„edelisto}} It's not the worst idea if optional, but I'm still not a fan of reformatting underscores because it's ''both'' a) potentially unexpected and b) potentially breaking (if an underscore is desirable). The extant formatting stuff might match (a) but probably won't match (b). That said, I did a quick test using [https://en.wikipedia.org/w/index.php?search=hastemplate%3A%22main%22+insource%3A%2F%5C%7B%5C%7B%5Cs%2Amain%5B%5E%5C%7D%5D%2A%3F_%5B%5E%5C%7D%5D%2A%3F%5C%7D%5C%7D%2F&title=Special:Search&go=Go&ns0=1 a regex-based search], which timed out (regex searches are expensive) but produced 220 hits of pages calling {{tl|main}} with input containing an underscore, where {{tlc|main}} is transcluded to approximately 280k pages. Of the first 20 hits, 6 used the "label''n''" syntax to override the link and display something else (without an underscore). This is probably few enough to justify fixing instances manually rather than filtering at the module level. I'll fix some manually and see if more instances pop up on further searches. <span style="white-space:nowrap;">{{[[User:Nihiltres|<span style="color:#233D7A;">Nihiltres</span>]] |[[User talk:Nihiltres|talk]] |[[Special:Contributions/Nihiltres|edits]]}}</span> 20:44, 15 June 2020 (UTC) ***{{ping|Nihiltres}} What do you think about filtering at the level of {{tl|format link}} via {{tl|replace}}, instead of the module level? [[User:PsiÄ„edelisto|PsiÄ„edelisto]] ([[User talk:PsiÄ„edelisto|talk]] ⢠[[Special:Contributions/PsiÄ„edelisto|contribs]]) <sup>please ''always'' [[Help:Notifications|ping]]!</sup> 20:48, 15 June 2020 (UTC) ****{{ping|PsiÄ„edelisto}} A search <code><nowiki>hastemplate:"format link" insource:/\{\{ *format link[^\}_]*?_[^\}_]*?\}\}/</nowiki></code> does not time out and has no results, showing that no extant transclusions would be changed by the behaviour. That suggests it's not a change worth making at that level. <span style="white-space:nowrap;">{{[[User:Nihiltres|<span style="color:#233D7A;">Nihiltres</span>]] |[[User talk:Nihiltres|talk]] |[[Special:Contributions/Nihiltres|edits]]}}</span> 20:56, 15 June 2020 (UTC)
Summary:
Please note that all contributions to Tales from Chyria may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Chyria Wiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Wiki tools
Wiki tools
Page tools
Page tools
User page tools
More
What links here
Related changes
Page information
Page logs