From: Joey Hess Date: Wed, 12 Dec 2007 21:13:15 +0000 (-0500) Subject: * Allow dashes in preprocessor directive commands, and shortcuts. X-Git-Tag: 2.16~50 X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/commitdiff_plain/214bc2b65be0e8797c1235adea7a19325babf46f?hp=849f65a3437391562b88fef9c450d0931676342f * Allow dashes in preprocessor directive commands, and shortcuts. --- diff --git a/IkiWiki.pm b/IkiWiki.pm index 0029fd2e8..80750f502 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -680,7 +680,7 @@ sub preprocess ($$$;$$) { #{{{ # consider it significant. my @params; while ($params =~ m{ - (?:(\w+)=)? # 1: named parameter key? + (?:([-\w]+)=)? # 1: named parameter key? (?: """(.*?)""" # 2: triple-quoted value | @@ -740,11 +740,11 @@ sub preprocess ($$$;$$) { #{{{ $content =~ s{ (\\?) # 1: escape? \[\[ # directive open - (\w+) # 2: command + ([-\w]+) # 2: command \s+ ( # 3: the parameters.. (?: - (?:\w+=)? # named parameter key? + (?:[-\w]+=)? # named parameter key? (?: """.*?""" # triple-quoted value | diff --git a/debian/changelog b/debian/changelog index af413c831..8c8f4aa95 100644 --- a/debian/changelog +++ b/debian/changelog @@ -28,6 +28,7 @@ ikiwiki (2.16) UNRELEASED; urgency=low * Avoid unnecessary stat calls to get mtime when rendering pages, use cached value. * Preserve input file modification times in output files. + * Allow dashes in preprocessor directive commands, and shortcuts. -- Joey Hess Mon, 03 Dec 2007 14:47:36 -0500 diff --git a/doc/plugins/shortcut/discussion.mdwn b/doc/plugins/shortcut/discussion.mdwn index 0ecf29537..159e68ad8 100644 --- a/doc/plugins/shortcut/discussion.mdwn +++ b/doc/plugins/shortcut/discussion.mdwn @@ -3,6 +3,8 @@ I'd like to use a shortcut like \[[gnumach-1-branch ddb/db_expr.h]] to link to * Dashes are not allowed in shortcut identifiers. Why? +> No reason. Fixed in git. --[[Joey]] + * The URL is rewritten to , which the remove server doesn't like. Mind the esacping of [^A-Za-z0-9].