Skip to content

Commit

Permalink
Start duplicate suffixes at two
Browse files Browse the repository at this point in the history
  • Loading branch information
caendesilva committed Dec 5, 2024
1 parent 99e2d1e commit 7f40d01
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ protected function makeHeadingId(string $contents): string

// Check for duplicates in the tracker
$id = $identifier;
$suffix = 1;
$suffix = 2;
while (in_array($id, $this->headingRegistry)) {
$id = $identifier.'-'.$suffix++;
}
Expand Down

0 comments on commit 7f40d01

Please sign in to comment.