MCPcopy Index your code
hub / github.com/danvk/webdiff / getHtmlSubstring

Method getHtmlSubstring

ts/codediff/html-text-mapper.ts:11–14  ·  view source on GitHub ↗
(start: number, limit: number)

Source from the content-addressed store, hash-verified

9 // Get the substring of HTML corresponding to text.substr(start, len).
10 // Leading markup is included with index 0, trailing with the last char.
11 getHtmlSubstring(start: number, limit: number) {
12 const count = limit - start;
13 return html_substr(this.html_, start, count);
14 }
15}
16
17// Returns the HTML corresponding to text in positions [start, start+count).

Callers 2

codesToHtmlFunction · 0.80
htmlsubstr_test.tsFile · 0.80

Calls 1

html_substrFunction · 0.85

Tested by

no test coverage detected