Parses the Wikidot image block syntax: [[image source attributes]].
Images support several alignment/float prefixes that modify how the
image is positioned on the page:
[[image src]] -- default (no alignment)
[[=image src]] -- centered
[[<image src]] -- left-aligned
[[>image src]] -- right-aligned
[[f<image src]] -- float left
[[f>image src]] -- float right
[[f=image src]] -- float center
Image sources can be:
Full URLs (http://..., https://..., /path)
Local file references in three formats:
file.ext (file on current page, type file1)
page/file.ext (file on another page, type file2)
site:page/file.ext or site/page/file.ext (cross-site file, type file3)
Optional attributes follow the source (e.g. alt, title, width,
height, style, class, link). The link attribute is treated
specially: it wraps the image in a hyperlink rather than being applied
as an HTML attribute. Unsafe attributes are filtered out.
Produces an "image" AST element with source, alignment, link, and
attribute data.
Parses the Wikidot image block syntax:
[[image source attributes]].Images support several alignment/float prefixes that modify how the image is positioned on the page:
[[image src]]-- default (no alignment)[[=image src]]-- centered[[<image src]]-- left-aligned[[>image src]]-- right-aligned[[f<image src]]-- float left[[f>image src]]-- float right[[f=image src]]-- float centerImage sources can be:
http://...,https://...,/path)file.ext(file on current page, typefile1)page/file.ext(file on another page, typefile2)site:page/file.extorsite/page/file.ext(cross-site file, typefile3)Optional attributes follow the source (e.g.
alt,title,width,height,style,class,link). Thelinkattribute is treated specially: it wraps the image in a hyperlink rather than being applied as an HTML attribute. Unsafe attributes are filtered out.Produces an
"image"AST element with source, alignment, link, and attribute data.