Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit cb9b372

Browse files
committed
Better support for PHPStan style templates and HTML in parameter documentation
1 parent c948759 commit cb9b372

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

‎src/PHPFUI/InstaDoc/Section/CodeCommon.php‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,14 @@ protected function formatComments(?\phpDocumentor\Reflection\DocBlock $docBlock,
252252
$body .= $this->getColor('variable', '$' . $varname) . '';
253253
}
254254
}
255-
$body .= $this->parsedown->html(\str_replace(['<', '>'], ['&lt;', '&gt;'], $description));
255+
$parts = \explode('$', $description);
256+
257+
if (\count($parts) > 1)
258+
{
259+
$parts[0] = \str_replace(['<', '>'], ['&lt;', '&gt;'], $parts[0]);
260+
$description = \implode('$', $parts);
261+
}
262+
$body .= $this->parsedown->html($description);
256263
$ul->addItem(new \PHPFUI\ListItem($this->getColor('name', $name) . '' . $this->getColor('description', $body)));
257264
}
258265

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /