diff --git a/src/App.tsx b/src/App.tsx index 75df916..046ef15 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -43,7 +43,7 @@ const App: Component = () => {
-
+
); diff --git a/src/markdown/table.ts b/src/markdown/table.ts index c281666..0765250 100644 --- a/src/markdown/table.ts +++ b/src/markdown/table.ts @@ -48,9 +48,8 @@ export default function markedTable(): MarkedExtension { if(header.findIndex(header => header.text === 'body') < 0){ // 收集所有非 label 列的表头 - const bodyColumns = header - .filter(cell => cell.text !== 'md-table-label') - .map(cell => cell.text); + const bodyColumns = headers + .filter(cell => cell !== 'label'); // 构建 body 列的模板:**列名**:{{列名}}\n\n const bodyTemplate = bodyColumns