Skip to content

Commit

Permalink
do not create footnote when href and anchor text are equal
Browse files Browse the repository at this point in the history
  • Loading branch information
frederikbosch committed Jun 6, 2017
1 parent 419de06 commit 985877d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/AlternativeText.php
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ private function updateLinks(\DOMDocument $document): void
];

/** @var \DOMElement $element */
foreach ($xpath->query('//a[@href]') as $element) {
foreach ($xpath->query('//a[@href and @href != .]') as $element) {
$itemString = (string) $item;
$itemUnicode = '';
for ($i = 0, $j = strlen($itemString); $i < $j; $i++) {
Expand Down

0 comments on commit 985877d

Please sign in to comment.