Skip to content

Commit

Permalink
Add data-nosnippet to the heading links (fixes #112)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark-H committed Mar 16, 2021
1 parent 87eed31 commit d27682a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Helpers/MarkupFixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ public function fix(string $markup, int $topLevel = 1, int $depth = 6): string
$link = $domDocument->createElement('a');
$link->setAttribute('href', '#' . $node->getAttribute('id'));
$link->setAttribute('class', 'heading-link');
$link->setAttribute('data-nosnippet', 'true');
$link->textContent = '';
$node->appendChild($link);
}
Expand Down

0 comments on commit d27682a

Please sign in to comment.