visuddhinanda 2 лет назад
Родитель
Сommit
1bacfbc41d
1 измененных файлов с 0 добавлено и 19 удалено
  1. 0 19
      app/Http/Api/MdRender.php

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

@@ -349,30 +349,11 @@ class MdRender{
         /**
          * markdown -> html
          */
-        Log::info('markdown -> html');
         /*
         $markdown = str_replace(['[[',']]'],['㐛','㐚'],$markdown);
         $html = Str::markdown($markdown);
         $html = str_replace(['㐛','㐚'],['[[',']]'],$html);
         $html = MdRender::fixHtml($html);
-
-        //给H1-6 添加uuid
-        for ($i=1; $i<7 ; $i++) {
-            if(strpos($html,"<h{$i}>")===false){
-                continue;
-            }
-            $output = array();
-            $input = $html;
-            $hPos = strpos($input,"<h{$i}>");
-            while ($hPos !== false) {
-                $output[] = substr($input,0,$hPos);
-                $output[] = "<h{$i} id='".Str::uuid()."'>";
-                $input = substr($input,$hPos+4);
-                $hPos = strpos($input,"<h{$i}>");
-            }
-            $output[] = $input;
-            $html = implode('',$output);
-        }
 */
 
         #替换术语