UNPKG

ace-diff

Version:

A diff/merging wrapper for Ace Editor built on google-diff-match-patch

15 lines (14 loc) 365 B
module.exports = function createArrow(info) { const el = document.createElement('div'); const props = { class: info.className, style: `top:${info.topOffset}px`, title: info.tooltip, 'data-diff-index': info.diffIndex, }; for (const key in props) { el.setAttribute(key, props[key]); } el.innerHTML = info.arrowContent; return el; };