Fix issue w/ duplicate section IDs

fixes #11580
This commit is contained in:
Eric Lippmann 2016-04-13 14:49:34 +02:00
parent 42112b28c5
commit 04a3d3e90d
1 changed files with 4 additions and 2 deletions

View File

@ -133,9 +133,11 @@ class DocParser
*/
protected function uuid($id, $filename, SimpleTree $tree)
{
if ($tree->getNode($id) !== null) {
$id = $id . '-' . md5($filename);
$id = str_replace(' ', '-', $id);
if ($tree->getNode($id) === null) {
return $id;
}
$id = $id . '-' . md5($filename);
$offset = 0;
while ($tree->getNode($id)) {
if ($offset++ === 0) {