MCPcopy
hub / github.com/htmlhint/HTMLHint / saveBlock

Method saveBlock

src/core/htmlparser.ts:96–117  ·  view source on GitHub ↗
(
      type: string,
      raw: string,
      pos: number,
      data?: Partial<Block>
    )

Source from the content-addressed store, hash-verified

94
95 // Memory block
96 const saveBlock = (
97 type: string,
98 raw: string,
99 pos: number,
100 data?: Partial<Block>
101 ) => {
102 const col = pos - lastLineIndex + 1
103 if (data === undefined) {
104 data = {}
105 }
106 data.raw = raw
107 data.pos = pos
108 data.line = line
109 data.col = col
110 arrBlocks.push(data)
111 this.fire(type, data)
112
113 while (regLine.exec(raw)) {
114 line++
115 lastLineIndex = pos + regLine.lastIndex
116 }
117 }
118
119 while ((match = regTag.exec(html))) {
120 matchIndex = match.index

Callers

nothing calls this directly

Calls 1

fireMethod · 0.95

Tested by

no test coverage detected