Parses the Wikidot font size syntax: [[size value]]text[[/size]].
[[size value]]text[[/size]]
This syntax wraps inline content in a <span> with an explicit font-size CSS style. The size value must include a number and a supported CSS unit.
<span>
font-size
Supported units (matching Wikidot's implementation): px, em, rem, ex, %, cm, mm, in, pc
px
em
rem
ex
%
cm
mm
in
pc
Notably, pt, vh, vw, and other modern CSS units are NOT supported and will cause the parse to fail.
pt
vh
vw
Wikidot syntax examples:
[[size 120%]]larger text[[/size]]
[[size 0.8em]]smaller text[[/size]]
[[size 24px]]fixed size[[/size]]
Produces a "container" AST element with type: "size" and a style attribute containing the font-size declaration.
"container"
type: "size"
style
Parses the Wikidot font size syntax:
[[size value]]text[[/size]].This syntax wraps inline content in a
<span>with an explicitfont-sizeCSS style. The size value must include a number and a supported CSS unit.Supported units (matching Wikidot's implementation):
px,em,rem,ex,%,cm,mm,in,pcNotably,
pt,vh,vw, and other modern CSS units are NOT supported and will cause the parse to fail.Wikidot syntax examples:
[[size 120%]]larger text[[/size]][[size 0.8em]]smaller text[[/size]][[size 24px]]fixed size[[/size]]Produces a
"container"AST element withtype: "size"and astyleattribute containing thefont-sizedeclaration.