(html, links)
| 116 | * @returns {string} Transformed HTML string |
| 117 | */ |
| 118 | export const execPostParser = (html, links) => { |
| 119 | const doc = new DOMParser().parseFromString(html, 'text/html') |
| 120 | findTransformations(links).map(tfm => tfm.post).filter(fn => isFunction(fn)).forEach(fn => fn(doc)) |
| 121 | return Array.from(doc.childNodes).map(it => it.outerHTML).join('') |
| 122 | } |
no test coverage detected
searching dependent graphs…