MCPcopy Index your code
hub / github.com/rtfpessoa/diff2html / constructor

Method constructor

src/ui/js/diff2html-ui-base.ts:46–51  ·  view source on GitHub ↗
(target: HTMLElement, diffInput?: string | DiffFile[], config: Diff2HtmlUIConfig = {}, hljs?: HLJSApi)

Source from the content-addressed store, hash-verified

44 currentSelectionColumnId = -1;
45
46 constructor(target: HTMLElement, diffInput?: string | DiffFile[], config: Diff2HtmlUIConfig = {}, hljs?: HLJSApi) {
47 this.config = { ...defaultDiff2HtmlUIConfig, ...config };
48 this.diffHtml = diffInput !== undefined ? html(diffInput, this.config) : target.innerHTML;
49 this.targetElement = target;
50 if (hljs !== undefined) this.hljs = hljs;
51 }
52
53 draw(): void {
54 this.targetElement.innerHTML = this.diffHtml;

Callers

nothing calls this directly

Calls 1

htmlFunction · 0.90

Tested by

no test coverage detected