]> sipb.mit.edu Git - ikiwiki.git/blob - doc/bugs/Spaces_in_link_text_for_ikiwiki_links.mdwn
web commit by http://madduck.net/
[ikiwiki.git] / doc / bugs / Spaces_in_link_text_for_ikiwiki_links.mdwn
1 Versions 2.0 and 2.1 of ikiwiki, and I think earlier versions as well,
2 allowed wiki links to have spaces in the link text. For example, [[ikiwiki
3 logo page|logo]] should create an anchor tag referencing the logo page, and
4 [[ikiwiki logo|logo/ikiwiki.png]] should create an image tag referencing
5 the logo.
6
7 As of version 2.2, this no longer works. I think the pattern \\[[...|...]]
8 should allow spaces before the pipe. I suspect this is the same problem as
9 reported in [[index/discussion#index11h1]].
10
11 > The above examples are ambiguous, only worked due to a bug, and were
12 > never documented to work. So I'm not inclined to re-add support for them.
13
14 > If you look at [[ikiwiki/WikiLink]], it is clear that spaces cannot be used in
15 > WikiLinks. It also shows how to use underscores in the link text if you
16 > want multiple words.
17 >
18 > This was a decision I made a long time ago due to the ambiguity between a
19 > WikiLink and a [[ikiwiki/PreProcessorDirective]]. Is "\[[foo bar|baz]]" a wikilink to
20 > baz with a link text of "foo bar", or an instance of preprocessor
21 > directive "foo" with a parameter of "bar|baz"? If it's interpreted as a 
22 > wikilink today, that could change tomorrow if a new preprocessor directive
23 > is added.
24
25 > Before version 2.2, ikiwiki actually first treated it as a preprocessor
26 > directive. If that failed, it output the preprocessor directive back onto
27 > the page, and next the wikilink code tried treating it as a wikilink.
28 > In 2.2, I fixed several problems with the way an unhandled preprocessor
29 > directive was re-output onto the page, by prefixing it with a '\' ...
30 > which makes it not be treated as a WikiLink.
31
32 > If WikiLinks had ever been documented to work with spaces in them, then
33 > I'd feel I needed to support the pre 2.2 behavior, but I don't feel that
34 > I have to support old behavior that was never documented and happened due
35 > to a bug, so I current have no plans to bring the old behavior back.
36 > --[[Joey]]
37
38 [[done]]