replaced with a link to the [[CGI]]?
* [[ikiwiki]] should go to the same place as [[index]] (on this wiki).
* There's no way to escape a [[WikiLink]] when discussing one on a wiki.
-* Wikilinks are even expanded in the middle of [[MarkDown]] code blocks,
- and probably shouldn't be (nor in blockquotes?)
-
- Hmm, the best way to fix this would be to add WikiLink support into
- markdown, but that will probably be a bear. I guess the question is how
- common "[[ ]]" is, and maybe we should just provide a way to escape a
- wikilink..
## sigs
-Need a way to sign name in page that's easier to type than "-- [[ Joey ]]"
+Need a way to sign name in page that's easier to type than "--\[[Joey]]"
and that includes the date.
-What syntax do other wikis use for this? I'm considering "[[ -- ]]" (with
+What syntax do other wikis use for this? I'm considering "\[[--]]" (with
spaces removed) as it has a nice nmemonic.
OTOH, adding additional syntax for this would be counter to one of the
design goals for ikiwiki: keeping as much markup as possible out of the
wiki and not adding nonstandard markup. And it's not significantly hard to
-type "--[[Joey]]", and as to the date, we do have page history.
+type "--\[[Joey]]", and as to the date, we do have page history.
## recentchanges links to commit diffs
WikiLinks provide easy linking between pages of the wiki. To create a
-WikiLink, just put the name of the page to link to in double brackets. For
-examples "[[ WikiLink ]]" (without the added whitespace).
+[[WikiLink]], just put the name of the page to link to in double brackets.
+For example "\[[WikiLink]]".
+
+If you ever need to write something like "\[[WikiLink]] without creating a
+wikilink, just prefix it with a "\", like "\\\\[[WikiLink]]".
Note that there are some special [[SubPage/LinkingRules]] that come into
play when linking between [[SubPage]]s.
WikiLinks can be entered in any case you like, the page they link to is
always lowercased.
-Note that if the file linked to by a WikiLink looks like an image, it will be displayed inline on the page.
\ No newline at end of file
+Note that if the file linked to by a WikiLink looks like an image, it will be displayed inline on the page.
my $content=shift;
my @links;
- while ($content =~ /$config{wiki_link_regexp}/g) {
+ while ($content =~ /(?<!\\)$config{wiki_link_regexp}/g) {
push @links, lc($1);
}
return @links;
my $content=shift;
my $file=shift;
- $content =~ s/$config{wiki_link_regexp}/htmllink(pagename($file), $1)/eg;
+ $content =~ s{(\\?)$config{wiki_link_regexp}}{
+ $1 ? "[[$2]]" : htmllink(pagename($file), $2)
+ }eg;
return $content;
} #}}}