fix: anchor links

Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
David Mehren 2024-08-31 18:51:16 +02:00
parent 1f8f09c539
commit 1b91232909

View file

@ -847,7 +847,7 @@ const anchorForId = id => {
const anchor = document.createElement('a') const anchor = document.createElement('a')
anchor.ariaHidden = 'true' anchor.ariaHidden = 'true'
anchor.className = 'anchor hidden-xs' anchor.className = 'anchor hidden-xs'
anchor.href = `#${id}` anchor.href = `${document.location.origin}${document.location.pathname}#${id}`
anchor.innerHTML = '<i class="fa fa-link"></i>' anchor.innerHTML = '<i class="fa fa-link"></i>'
anchor.title = id anchor.title = id
return anchor return anchor