mirror of https://github.com/requarks/wiki
feat: underline markdown support (#2073)
* fix: no markdown support for underline #2072pull/2086/head
parent
0e6340f51e
commit
e03a80dccc
@ -0,0 +1,12 @@
|
||||
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;
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
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;
|
||||
}
|
Loading…
Reference in new issue