瀏覽代碼

fix marked parse call

Konstantinos Kaloutas 2 年之前
父節點
當前提交
33f6438d38
共有 2 個文件被更改,包括 4 次插入4 次删除
  1. 3 3
      resources/marketplace.html
  2. 1 1
      src/main/frontend/handler/plugin.cljs

+ 3 - 3
resources/marketplace.html

@@ -19,7 +19,7 @@
       width: 100%;
       min-height: 100%;
     }
- 
+
       html::-webkit-scrollbar-thumb {
         background-color: rgba(0, 0, 0, 0.1);
       }
@@ -40,7 +40,7 @@
       html::-webkit-scrollbar-corner {
         background: transparent;
       }
-    
+
     body {
       display: flex;
     }
@@ -125,7 +125,7 @@
       }
     })
 
-    content = marked(content).replace('src="./', `src="${fixLink('')}`)
+    content = marked.parse(content).replace('src="./', `src="${fixLink('')}`)
     setContent(content)
   }())
 </script>

+ 1 - 1
src/main/frontend/handler/plugin.cljs

@@ -41,7 +41,7 @@
   [s]
   (try
     (if (string? s)
-      (js/window.marked s) s)
+      (js/window.marked.parse s) s)
     (catch js/Error e
       (js/console.error e) s)))