myspan = {
const one = "robin linacre";
const other = "roin liinacre";
const color = "";
let diffy = Diff.diffChars(one, other);
function get_span(p) {
const bgc = p.added ? "#eaf2c2" : p.removed ? "#fadad7" : "white";
const textc = p.added ? "#406619" : p.removed ? "#b30000" : "black";
return `<span style="background: ${bgc}; color: ${textc} ">${p.value}</span>`;
}
return html`${diffy.map((part) => get_span(part))}`;
}