]> git.wincent.com - wikitext.git/commit
Add support for "absolute" image "src" attributes
authorWincent Colaiuta <win@wincent.com>
Wed, 6 May 2009 22:02:46 +0000 (00:02 +0200)
committerWincent Colaiuta <win@wincent.com>
Wed, 6 May 2009 22:15:12 +0000 (00:15 +0200)
commit5727e84b569d95cff60d22a7e957ff8983a6a9ac
treecb86de22ed2b813e389ceab4d9fbc57e934697d9
parent73960109a2f3a58d157a3a5621831b5dcf0a7fd7
Add support for "absolute" image "src" attributes

Under the default settings input like "{{foo.png}}" will be translated
to an "img" tag with "src" attribute of "/images/foo.png".

With this commit, we provide a shortcut for breaking out of the "prefix"
directory: any target beginning with a slash will be interpreted as
"absolute". So input like "{{/foo.png}}" will yield a "src" of
"/foo.png".

This is a somewhat prettier mechanism than using inputs like
"{{../foo.png}}", which already worked under the current translator.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
doc/README
ext/parser.c
spec/img_spec.rb