wikijs-fork/server/modules/rendering/html-diagram/renderer.js

11 lines
272 B
JavaScript
Raw Permalink Normal View History

module.exports = {
async init($, config) {
$(`pre.diagram`).each((idx, elm) => {
$(elm).children('svg').each((sidx, svg) => {
$(svg).removeAttr('content')
})
$(elm).replaceWith($(`<div class="diagram">${$(elm).html()}</div>`))
})
}
}