MCPcopy Create free account
hub / github.com/Effect-TS/effect / addText

Method addText

packages/effect/src/encoding/Xml.ts:1619–1624  ·  view source on GitHub ↗
(i: number, size: number)

Source from the content-addressed store, hash-verified

1617 // Adds the size of the text run or CDATA section at `i`. Exceeding the limit
1618 // is reported there, rather than at the start of the text.
1619 private addText(i: number, size: number): void {
1620 this.textSize += size
1621 if (this.textSize > this.maxTokenSize) {
1622 throw this.tokenLimit(this.base + i)
1623 }
1624 }
1625
1626 // Checks that the text run `s[i, j)` outside the root element is whitespace
1627 private whitespace(s: string, i: number, j: number): void {

Callers 2

parseMethod · 0.95
cdataMethod · 0.95

Calls 1

tokenLimitMethod · 0.95

Tested by

no test coverage detected