Pārlūkot izejas kodu

needs growi-directive types

reiji-h 1 gadu atpakaļ
vecāks
revīzija
50c37d1e60

+ 2 - 1
packages/remark-attachment-refs/src/client/services/renderer/refs.ts

@@ -24,7 +24,8 @@ type DirectiveAttributes = Record<string, string>
 
 
 export const remarkPlugin: Plugin = function() {
 export const remarkPlugin: Plugin = function() {
   return (tree) => {
   return (tree) => {
-    visit(tree, (node) => {
+    visit(tree, (node: any) => {
+      // TODO: growi-directive types
       if (node.type === remarkGrowiDirectivePluginType.Text || node.type === remarkGrowiDirectivePluginType.Leaf) {
       if (node.type === remarkGrowiDirectivePluginType.Text || node.type === remarkGrowiDirectivePluginType.Leaf) {
         if (typeof node.name !== 'string') {
         if (typeof node.name !== 'string') {
           return;
           return;