Sfoglia il codice sorgente

[[用罕见汉字替换。解决黑体术语渲染失败的问题

visuddhinanda 2 anni fa
parent
commit
1706cfa3ee
1 ha cambiato i file con 2 aggiunte e 0 eliminazioni
  1. 2 0
      app/Http/Api/MdRender.php

+ 2 - 0
app/Http/Api/MdRender.php

@@ -216,7 +216,9 @@ class MdRender{
         /**
          * markdown -> html
          */
+        $markdown = str_replace(['[[',']]'],['㐛','㐚'],$markdown);
         $html = Str::markdown($markdown);
+        $html = str_replace(['㐛','㐚'],['[[',']]'],$html);
 
         #替换术语
         $pattern = "/\[\[(.+?)\]\]/";