Explorar o código

add node type check

jam411 %!s(int64=3) %!d(string=hai) anos
pai
achega
f9163db7ce
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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() {
   return (tree) => {
     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
         // see: