Enable uploads and upload an image with a CamelCase name, for example CamelCase.png. Then try to display the image inline with this code:
Rather than getting an inline image, it shows the word CamelCase as a missing document (clickable question mark to create a new document, provided, of course, the document doesn't exist):
and "upload:CamelCase" is a link to the image (without its extension).
upload:lowercase.png works as I would expect.
If the wiki page CamelCase actually exists, my system shows the image properly.
I tried prefixing "(?<!upload:)" (a negative look-behind) on $LinkPattern but still had problems. If the filename is something like MyCamelCase.png, the link is to the document CamelCase.... so this fixes my problem. It may make a problem for you, though ;-)
The fix is to ensure wiki-style links' names are the starts of their words.
Side-effects:
*** wiki.o Thu Jan 29 10:04:02 2004 --- wiki Thu Jan 29 12:03:05 2004 *************** *** 270,276 **** } $UpperLetter .= "]"; $LowerLetter .= "]"; $AnyLetter .= "]"; # Main link pattern: lowercase between uppercase, then anything ! $LpA = $UpperLetter . "+" . $LowerLetter . "+" . $UpperLetter . $AnyLetter . "*"; # Optional subpage link pattern: uppercase, lowercase, then anything $LpB = $UpperLetter . "+" . $LowerLetter . "+" . $AnyLetter . "*"; --- 270,276 ---- } $UpperLetter .= "]"; $LowerLetter .= "]"; $AnyLetter .= "]"; # Main link pattern: lowercase between uppercase, then anything ! $LpA = "\b" . $UpperLetter . "+" . $LowerLetter . "+" . $UpperLetter . $AnyLetter . "*"; # Optional subpage link pattern: uppercase, lowercase, then anything $LpB = $UpperLetter . "+" . $LowerLetter . "+" . $AnyLetter . "*";-- Ke4roh
if ($UseUpload) { s/$UploadPattern/&StoreUpload($1)/geo; }to just after the EvalLocalRules? in CommonMarkup.
I may have sinned by editing my patch after posting it, editing it with bug fixes. I'm curious now if you applied the patch above or the old patch that I know would trash other link types. I haven't figured out what link types this patch might trash yet. Thanks! -- Ke4roh
if ($WikiLinks) {"
line (about 9 lines up). -- DavidClaughton