We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2c7239f commit 8f7ef0fCopy full SHA for 8f7ef0f
src/DocParser.php
@@ -19,13 +19,16 @@ class DocParser
19
20
private string $html;
21
22
+ private DocFile $file;
23
+
24
public function __construct(DocFile $file)
25
{
26
$parse = new ParsedownExtra();
27
28
$text = FileHelper::readContents($file->getPath());
29
$text = $this->parseListStyles($text);
30
31
+ $this->file = $file;
32
$this->html = strval($parse->text($text));
33
34
$this->parseHeaders();
@@ -94,7 +97,7 @@ private function parseHeaders() : void
94
97
95
98
$active[$level] = $header;
96
99
- $this->html = $header->replace($this->html);
100
+ $this->html = $header->replace($this->html, $this->file);
101
102
if($level === 1) {
103
$this->headers[] = $header;
0 commit comments