Doc: Fix header anchor detection

This commit is contained in:
Eric Lippmann 2017-07-28 10:20:18 +02:00
parent 0e480dd54a
commit c4e236cce9
1 changed files with 1 additions and 1 deletions

View File

@ -109,7 +109,7 @@ class DocParser
if ($header === null) {
return null;
}
if ($header[0] === '<'
if (strpos($header, '<') !== false
&& preg_match('#(?:<(?P<tag>a|span) (?:id|name)="(?P<id>.+)"></(?P=tag)>)\s*#u', $header, $match)
) {
$header = str_replace($match[0], '', $header);