Fix quoted links in Doxygen documentation.

GitOrigin-RevId: 75e001cf8287154654fa5175401786e4684a95b1
This commit is contained in:
levlam 2019-12-25 19:16:43 +03:00
parent a1b67327b1
commit 4678b5177c

View File

@ -38,6 +38,11 @@ class DoxygenTlDocumentationGenerator extends TlDocumentationGenerator
protected function escapeDocumentation($doc)
{
$doc = htmlspecialchars($doc);
$doc = preg_replace_callback('/"((http|https|tg):\/\/[^" ]*)"/',
function ($quoted_link)
{
return "&quot;<a href=\"".$quoted_link[1]."\">".$quoted_link[1]."</a>&quot;";
}, $doc);
$doc = str_replace('*/', '*&#47;', $doc);
$doc = str_replace('#', '\#', $doc);
return $doc;