(html, links)
| 102 | * @returns {string} Transformed HTML string |
| 103 | */ |
| 104 | export const execPreParser = (html, links) => { |
| 105 | const doc = new DOMParser().parseFromString(html, 'text/html') |
| 106 | findTransformations(links).map(tfm => tfm.pre).filter(fn => isFunction(fn)).forEach(fn => fn(doc)) |
| 107 | return Array.from(doc.childNodes).map(it => it.outerHTML).join('') |
| 108 | } |
| 109 | |
| 110 | /** |
| 111 | * Run post-extraction transformations on extracted article content. |
no test coverage detected
searching dependent graphs…