text() — svelte Function Reference
Architecture documentation for the text() function in text.js from the svelte codebase.
Entity Profile
Dependency Diagram
graph TD 336f9996_ecb1_725a_1c20_d9de54fd73b9["text()"] 6b133d64_dd9e_dc63_5b9b_73e9e80bc0dd["text.js"] 336f9996_ecb1_725a_1c20_d9de54fd73b9 -->|defined in| 6b133d64_dd9e_dc63_5b9b_73e9e80bc0dd 83712aa1_c83d_1cd5_c47d_1cdb04dd210c["decode_character_references()"] 336f9996_ecb1_725a_1c20_d9de54fd73b9 -->|calls| 83712aa1_c83d_1cd5_c47d_1cdb04dd210c style 336f9996_ecb1_725a_1c20_d9de54fd73b9 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/svelte/src/compiler/phases/1-parse/state/text.js lines 6–23
export default function text(parser) {
const start = parser.index;
let data = '';
while (parser.index < parser.template.length && !parser.match('<') && !parser.match('{')) {
data += parser.template[parser.index++];
}
/** @type {AST.Text} */
parser.append({
type: 'Text',
start,
end: parser.index,
raw: data,
data: decode_character_references(data, false)
});
}
Domain
Subdomains
Source
Frequently Asked Questions
What does text() do?
text() is a function in the svelte codebase, defined in packages/svelte/src/compiler/phases/1-parse/state/text.js.
Where is text() defined?
text() is defined in packages/svelte/src/compiler/phases/1-parse/state/text.js at line 6.
What does text() call?
text() calls 1 function(s): decode_character_references.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free