Skip to content

Commit de63766

Browse files
committed
Adjust Markdown::parse to reflect flame changes
Signed-off-by: Sam Poyigi <[email protected]>
1 parent 4abe20e commit de63766

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

models/Resource.php

+3-6
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
use Igniter\Flame\Database\Traits\Purgeable;
99
use Igniter\Flame\Database\Traits\Validation;
1010
use Igniter\Flame\Mail\Markdown;
11-
use Igniter\Flame\Support\Facades\File;
1211
use Model;
1312
use System\Classes\ExtensionManager;
1413

@@ -109,13 +108,11 @@ public function getBaseEndpointAttribute($value)
109108

110109
public function renderSetupPartial()
111110
{
112-
$content = 'No documentation provided';
113-
114111
$docsPath = extension_path('igniter/api/docs/'.sprintf('%s.md', $this->endpoint));
115-
if ($docsPath = File::existsInsensitive($docsPath))
116-
$content = (new Markdown)->parse(File::get($docsPath));
117112

118-
return $content;
113+
$markdown = Markdown::parseFile($docsPath);
114+
115+
return $markdown ? $markdown->toHtml() : 'No documentation provided';
119116
}
120117

121118
//

0 commit comments

Comments
 (0)