X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/214bc2b65be0e8797c1235adea7a19325babf46f..43a88daa5fc23fb70c22ab4472dd293e04b7236d:/doc/plugins/shortcut/discussion.mdwn diff --git a/doc/plugins/shortcut/discussion.mdwn b/doc/plugins/shortcut/discussion.mdwn index 159e68ad8..7f0d58dbe 100644 --- a/doc/plugins/shortcut/discussion.mdwn +++ b/doc/plugins/shortcut/discussion.mdwn @@ -1,18 +1,49 @@ -I'd like to use a shortcut like \[[gnumach-1-branch ddb/db_expr.h]] to link to -. +The plugin depends on [[mdwn]]. If you have +disabled [[mdwn]], to get [[shortcut]] work, you need +commit in a shortcuts.ext (ext is `rcs|creole|html|txt|etc`), +and edit/patch [[shortcut]]. -* Dashes are not allowed in shortcut identifiers. Why? +Maybe use the `default_pageext` is better than hardcode .mdwn? -> No reason. Fixed in git. --[[Joey]] +--[[weakish]] -* The URL is rewritten to - , - which the remove server doesn't like. Mind the esacping of [^A-Za-z0-9]. - Might this be a problem of the web server? +> done, it will use `default_pageext` now --[[Joey]] -Also, I'd like to put the shortcut usages into backticks --- `[[iki shortcuts]]` -- -to have them displayed in the usual backtick-formatting. -That also doesn't work, but this is an already-reported issue, as far as I know. +--- ---[[tschwinge]] +Instead of modifying the [[basewiki]]'s [[shortcuts]] file for local needs -- +thus copying it at some point and losing continuity with upstream enhancements -- +what about handling a `shortcuts-local.mdwn` or `shortcuts/local.mdwn` (if such +a file exists in the wiki), and additionally process that one. Possibily a +conditional `\[[!inline]]` could be used. --[[tschwinge]] + +---- + +The page says + +> Additionally, %W is replaced with the text encoded just right for Wikipedia + +with the implication that this is odd. However, it appears the escapes +actually mean: + +=%s= + If every character in the string is in the Latin-1 range, encode each + character as a http %xx escape: ö -> %F6. If not, + mangle the string: ☃ (U+2603 SNOWMAN) -> %2603 which + actually means "&03". +=%S= + Leave the string as-is. +=%W= + Encode the string as UTF-8, then encode each byte of the UTF-8 + individually as a http %xx escape: ö -> %C3%B6, ☃ (U+2603 SNOWMAN) -> + %E2%98%83. + +http %xx encoding is defined in terms of input bytes, not input characters, +so you can't encode arbitrary Unicode into URLs without knowing which +encoding the destination server is going to use. UTF-8 is what's +recommended by the [[!wikipedia Internationalized resource identifier]] +specification, so I suspect %W is right more often than it's wrong... + +I wonder whether %s should mean what %W does now, with a new format +character - maybe %L for Latin-1? - for the version that only works +for strings that can be encoded losslessly in Latin-1? --[[smcv]]