OutputSpan
Interface: OutputSpan
Defined in: packages/tagscript/src/lib/Interpreter/Response.ts:11
A range of the finished body that a tag produced, rather than the template author typing it.
Ranges are half-open, [start, end), and are kept accurate as later tags resize the text around
them. A tag nested inside another does not get its own range, because the outer tag replaced it;
its declaration is listed in the outer range's OutputSpan.tags instead.
Properties
end
end: number
Defined in: packages/tagscript/src/lib/Interpreter/Response.ts:15
Where the output ends, exclusive.
start
start: number
Defined in: packages/tagscript/src/lib/Interpreter/Response.ts:19
Where the output starts.
tags
tags: (string | null)[]
Defined in: packages/tagscript/src/lib/Interpreter/Response.ts:27
Every tag that contributed text to this range, outermost first. null is a tag with no
declaration.
More than one means tags were nested. Anything deciding how to treat this text has to
consider all of them, since \{upper:\{user\}\} is as untrustworthy as \{user\} is.