Jelajahi Sumber

add node type check

jam411 3 tahun lalu
induk
melakukan
f9163db7ce
1 mengubah file dengan 1 tambahan dan 1 penghapusan
  1. 1 1
      packages/app/src/services/renderer/remark-plugins/table.ts

+ 1 - 1
packages/app/src/services/renderer/remark-plugins/table.ts

@@ -4,7 +4,7 @@ import { visit } from 'unist-util-visit';
 export const remarkPlugin: Plugin = function() {
 export const remarkPlugin: Plugin = function() {
   return (tree) => {
   return (tree) => {
     visit(tree, (node) => {
     visit(tree, (node) => {
-      if (node.type === 'table' || node.type === 'tableRow') {
+      if (node.type === 'table' || node.type === 'tableCell' || node.type === 'tableRow') {
 
 
         // omit position to fix the key regardless of its position
         // omit position to fix the key regardless of its position
         // see:
         // see: