refactor: convert xdx tables by default

This commit is contained in:
hypercross 2026-03-23 18:57:55 +08:00
parent 8f6a6b96e2
commit f658fd3380
1 changed files with 2 additions and 2 deletions

View File

@ -29,14 +29,14 @@ export default function markedTable(): MarkedExtension {
const header = token.header;
let roll = '';
const labelIndex = header.findIndex(cell => {
if(cell.text === 'md-roll-label'){
if(cell.text === 'md-roll-label' || cell.text.match(/(\d+)?d\d+/)){
roll = ' roll=true';
return true;
}else if(cell.text === 'md-remix-label'){
roll = ' roll=true remix=true';
return true;
}
return cell.text === 'md-table-label';
return cell.text === 'md-table-label' || cell.text === 'label';
});
// 默认表格渲染 - 使用 marked 默认行为