wikijs-fork/server/modules/rendering/markdown-core/underline.js
Jafar Akhondali 5ba36ee421
refactor: server code (#2545)
+ Remove duplicated await
+ Replace some legacy codes with ES6
+ Fix some of eslint problems
2020-10-14 11:16:27 -04:00

13 lines
289 B
JavaScript

const renderEm = (tokens, idx, opts, env, slf) => {
const token = tokens[idx]
if (token.markup === '_') {
token.tag = 'u'
}
return slf.renderToken(tokens, idx, opts)
}
module.exports = (md) => {
md.renderer.rules.em_open = renderEm
md.renderer.rules.em_close = renderEm
}