mirror of https://github.com/requarks/wiki
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
285 B
13 lines
285 B
2 years ago
|
function renderEm (tokens, idx, opts, env, slf) {
|
||
|
const token = tokens[idx]
|
||
|
if (token.markup === '_') {
|
||
|
token.tag = 'u'
|
||
|
}
|
||
|
return slf.renderToken(tokens, idx, opts)
|
||
|
}
|
||
|
|
||
|
export default (md) => {
|
||
|
md.renderer.rules.em_open = renderEm
|
||
|
md.renderer.rules.em_close = renderEm
|
||
|
}
|