mirror of
https://github.com/danbulant/Nertivia-Client
synced 2026-06-13 11:31:41 +00:00
10 lines
No EOL
404 B
JavaScript
10 lines
No EOL
404 B
JavaScript
export default function formatCode(md, opts) {
|
|
const defaultRender = md.renderer.rules.code_inline || function(tokens, idx, options, env, self) {
|
|
return self.renderToken(tokens, idx, options);
|
|
};
|
|
|
|
md.renderer.rules.code_inline = function (tokens, idx, options, env, self) {
|
|
tokens[idx].attrPush(['class', 'code-inline']);
|
|
return defaultRender(tokens, idx, options, env, self);
|
|
};
|
|
} |