Bug Report

Template Anchor: anchor becomes converted to lowercase [#2419]

Back to forum

New reply

 
reply
92.230.249.34: Template Anchor: anchor becomes converted to lowercase (2010-10-22 20:20) [#8061]

RueLue: I just added an anchor {{special:anchor | belowIsEdited }} , but calling the anchor with [xy | #belowIsEdited] didn't work: the anchor was not found, because it was converted to lowercase (I saw it in the source). The link to the anchor


Here is the anchor ->

Error: invalid anchor name

<-
X
ArnoHollosi: suggestion: allow lowercase anchors only (2010-11-10 22:06) [#8115]

Actually, this was by design, but not well documented.

Maybe the wiki engine should be even stricter and force the definition of the anchor templates to be lowercase too.

Once you allow mixed case anchors they may show up as references: e.g. adding {{ special:anchor | StartOfGame }} to page MyThirdGame will lead to MyThirdGame show up as reference at the page StartOfGame (if it exists).

This can get problematic, once the page gets renamed: the function is not smart enough to realize that StartOfGame is inside the special:anchor template and will rename the anchor as well and thus break the link.

I did a quick search: named anchors are not yet too common, so I suggest - if there are not important reasons to do otherwise - to make the function stricter and allow lowercase only (instead of automatically converting it to lowercase).

Opinions?

ArnoHollosi: fixed, change of behaviour (2010-11-14 16:17) [#8124]

I thought about it some more and changed the behaviour: anchor names are case-sensitive now, but must not start with an uppercase letter. That should strike a good balance between readable anchor names and internal technical complexity.

I've corrected most anchors, but for three pages: Dango, 4-4 Point Low Approach Tsukenobi Hamete and Low Invasion Of Fourth Line Three Space Extension.

 
Back to forum

New reply


[Welcome to Sensei's Library!]
RecentChanges
StartingPoints
About
RandomPage
Search position
Page history
Latest page diff
Partner sites:
Go Teaching Ladder
Goproblems.com
Login / Prefs
Tools
Sensei's Library