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


barebracketed
fooBar0fooBar0
foo Bar1foo Bar1
foo_Bar2foo_Bar2
foo.Bar3foo.Bar3
foo-Bar4foo-Bar4

barebracketed
FooBar10FooBar10
Foo Bar11Foo Bar11
Foo_Bar12Foo_Bar12
Foo.Bar13Foo.Bar13
Foo-Bar14Foo-Bar14

barebracketed
fooBarBlah20fooBarBlah20
foo BarBlah21foo BarBlah21
foo_BarBlah22foo_BarBlah22
foo.BarBlah23foo.BarBlah23
foo-BarBlah24foo-BarBlah24

barebracketed
FooBarBlah30FooBarBlah30
Foo BarBlah31Foo BarBlah31
Foo_BarBlah32Foo_BarBlah32
Foo.BarBlah33Foo.BarBlah33
Foo-BarBlah34Foo-BarBlah34

barebracketed
2foo2foo
2Foo2Foo
2fooBar2fooBar
2FooBar2FooBar

barebracketed
foo7barblahfoo7barblah
Foo7barblahFoo7barblah
foo7barBlahfoo7barBlah
Foo7barBlahFoo7barBlah
foo7Barblahfoo7Barblah
Foo7BarblahFoo7Barblah
foo7BarBlahfoo7BarBlah
Foo7BarBlahFoo7BarBlah

barebracketed
'_FooBarBlah'_FooBarBlah
'Foo_BarBlah'Foo_BarBlah
'FooBar_Blah'FooBar_Blah
'FooBarBlah_'FooBarBlah_

barebracketed
'7FooBarBlah'7FooBarBlah
'Foo7BarBlah'Foo7BarBlah
'FooBar7Blah'FooBar7Blah
'FooBarBlah7'FooBarBlah7

barebracketed
'-FooBarBlah'-FooBarBlah
'Foo-BarBlah'Foo-BarBlah
'FooBar-Blah'FooBar-Blah
'FooBarBlah-'FooBarBlah-

Add new attachment

Only authorized users are allowed to upload new attachments.
« This page (revision-4) was last changed on 14-Nov-2003 14:47 by JanneJalkanen