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

Method comment

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

Source from the content-addressed store, hash-verified

2025 }
2026
2027 private comment(s: string, i: number): number {
2028 const end = s.indexOf("-->", i + 4)
2029 if (end === -1) return -1
2030 const dashes = s.indexOf("--", i + 4)
2031 if (dashes < end) throw this.syntax("\"--\" is not allowed in comments", dashes)
2032 this.checkSize(i, end + 3)
2033 this.flushText()
2034 this.out.push({ _tag: "Comment", text: normalizeLines(s.slice(i + 4, end)) })
2035 return end + 3
2036 }
2037
2038 private processingInstruction(s: string, i: number): number {
2039 const end = s.indexOf("?>", i + 2)

Callers 1

markupMethod · 0.95

Calls 6

syntaxMethod · 0.95
checkSizeMethod · 0.95
flushTextMethod · 0.95
normalizeLinesFunction · 0.85
sliceMethod · 0.80
pushMethod · 0.65

Tested by

no test coverage detected