Class: Markup
A string wrapper that is safe to output as HTML, either because it has already been escaped or is considered safe without escaping.
Implements
Constructors
new Markup()
new Markup(
s):Markup
Markup constructor.
Parameters
• s: string
Escaped or safe markup text.
Returns
Defined in
src/builtin/drops/markup.ts:21
Accessors
[toStringTag]
get[toStringTag]():string
Returns
string
Defined in
src/builtin/drops/markup.ts:48
Methods
[toLiquidHtml]()
[toLiquidHtml]():
string
Returns
string
Implementation of
Defined in
src/builtin/drops/markup.ts:56
[toLiquidString]()
[toLiquidString]():
string
Returns
string
Implementation of
LiquidStringable.[toLiquidString]
Defined in
src/builtin/drops/markup.ts:60
[toPrimitive]()
[toPrimitive](
hint):null|string
Parameters
• hint: string
Returns
null | string
Defined in
src/builtin/drops/markup.ts:52
toString()
toString():
string
Returns a string representation of an object.
Returns
string
Defined in
src/builtin/drops/markup.ts:64
escape()
staticescape(value):Markup
A Markup factory function that will escape the input value if it is
not already Markup.
Parameters
• value: unknown
Any value. If it's already Markup, it will be returned
unchanged. Otherwise it will be converted to a string and escaped.
Returns
A string representation of the input value after HTML-escaping.
Defined in
src/builtin/drops/markup.ts:43
from()
staticfrom(s):Markup
A Markup factory function.
Parameters
• s: string | Markup
Escaped or safe markup text.
Returns
The input string inside a Markup wrapper.