Have a look at the tables at the bottom of this page (and hover the mouse over the question-mark links to see which wikipages it wants to go to), and you start to get an idea of the incongruities that currently exist in the JSPWiki linking-engine, or with the implementation of CamelCase.
Lessons I learned:
- When bracketed
- hyphens and spaces are both discarded. That is, [Hey-YouThere], [Hey YouThere] and [HeyYouThere] all map to the wikipage "HeyYouThere".
- dots and underscores are retained. That is [Hey_You] and [Hey.You] go to the wikipages "Hey_You" and "Hey.You", but you must use the [brackets] to make the link work.
- When unbracketed
- underscores and hyphens kill CamelCase. That is, Hey_YouThere and Hey-YouThere don't automatically create any links at all-- rather, you must use the brackets, in which case
- dots and spaces are considered whitespace separators. That is "Hey.YouThere" and "Hey YouThere" both only link to the page "YouThere"; "Hey" is not part of it. But if you do bracket them:
- [Hey.YouThere] does actually go to the wikipage "Hey.YouThere".
- [Hey YouThere] goes to the wikipage "HeyYouThere".
- underscores at the start or end of a CamelCase word are ignored and left off of the actual wikipage name, unless bracketed in which case they become a part of the wikipage name. In the middle of a CamelCase word, they kill the CamelCase, unless bracketed, in which case they are included as part of the wikipage name.
- hyphens at the start or end of a CamelCase word are always ignored. In the middle of a CamelCase word, they kill the CamelCase, unless bracketed, in which case they are ignored.
- digits embedded in a CamelCase word seem to break the automatic hyperlinking at unpredictable times. [Bracketing] them makes them work as you would expect.
-- DanHoward. Nov 13, 2003
Actually, calling them "problems" is a bit of an exaggeration - they work like this by design.
The official, approved version of linking to a page is to use the brackets. The CamelCase linking is just to make it easier to transition from other and older wikin engines, and thus they obey a set of different rules. For example, the underscore (_) and the dot are not a part of the traditional WikiWord, which consists of letters A-Z and a-z. (In fact, we also support most major languages that have a notion of capital letters). Even in most cases, numbers are not considered a part of the WikiWord, meaning that you are supposed to write ThisIsATestTwoPointThree instead of ThisIsATest2.3.
JSPWiki uses capital letters, small letters, numbers, dots and underscores as a part of a WikiName. Everything else will be ignored.
-- JanneJalkanen, 14-Nov-2003