diff --git a/src/node/markdown/markdown.ts b/src/node/markdown/markdown.ts index a423ee19cc03..9d2bd433a491 100644 --- a/src/node/markdown/markdown.ts +++ b/src/node/markdown/markdown.ts @@ -231,8 +231,12 @@ export const createMarkdownRenderer = async ( ) .use(lineNumberPlugin, options.lineNumbers) + const orgi = md.renderer.rules.table_open md.renderer.rules.table_open = function (tokens, idx, options, env, self) { - return '\n' + tokens[idx].attrGet('tabindex') ?? tokens[idx].attrJoin('tabindex', '0') + return orgi + ? orgi(tokens, idx, options, env, self) + : self.renderToken(tokens, idx, options) } if (options.gfmAlerts !== false) {