MCPcopy Create free account
hub / github.com/danvk/webdiff / textToHtml

Function textToHtml

ts/codediff/__tests__/addcharacterdiffs_test.ts:12–16  ·  view source on GitHub ↗
(text: string)

Source from the content-addressed store, hash-verified

10import {htmlTextMapper} from '../html-text-mapper';
11
12function textToHtml(text: string) {
13 const div = document.createElement('div');
14 div.textContent = text;
15 return div.innerHTML;
16}
17
18function htmlToText(html: string) {
19 const div = document.createElement('div');

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected