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

Method whitespace

packages/effect/src/encoding/Xml.ts:1627–1633  ·  view source on GitHub ↗
(s: string, i: number, j: number)

Source from the content-addressed store, hash-verified

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 {
1628 for (let k = i; k < j; k++) {
1629 if (!isSpace(s.charCodeAt(k))) {
1630 throw this.syntax(this.state === PROLOG ? "text before the root element" : "text after the root element", k)
1631 }
1632 }
1633 }
1634
1635 // Replaces references and normalizes line endings, or attribute whitespace.
1636 // `whitespace` is false when `raw` has nothing to normalize.

Callers 1

parseMethod · 0.95

Calls 2

syntaxMethod · 0.95
isSpaceFunction · 0.85

Tested by

no test coverage detected