From 8139f428a4c77e086e715f38ef81e90e46305df8 Mon Sep 17 00:00:00 2001
From: lihao <qq6666>
Date: Thu, 29 Sep 2022 11:15:02 +0800
Subject: [PATCH] fix

---
 src/Scanner.php | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/Scanner.php b/src/Scanner.php
index 107cf30..8dbbc2a 100644
--- a/src/Scanner.php
+++ b/src/Scanner.php
@@ -56,10 +56,14 @@ static function mappingRouter(
         }
     }
 
-    static function scanToHtml(string $controllerPath,string $projectName):string
+    static function scanToHtml(string $controllerPath,string $projectName,?string $tplAddress = null):string
     {
         $str = self::scanToMarkdown($controllerPath);
-        $temp = file_get_contents(__DIR__.'/doc.tpl');
+        if ($tplAddress) {
+            $temp = file_get_contents($tplAddress);
+        } else {
+            $temp = file_get_contents(__DIR__.'/doc.tpl');
+        }
         $html = ParserDown::instance()->parse($str);
         $temp = str_replace('{{$apiDoc}}',$html,$temp);
         return str_replace('{{$projectName}}',$projectName,$temp);