aboutsummaryrefslogtreecommitdiff
path: root/_plugins/add-anchor-to-header-from-header-id.rb
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--_plugins/add-anchor-to-header-from-header-id.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/_plugins/add-anchor-to-header-from-header-id.rb b/_plugins/add-anchor-to-header-from-header-id.rb
index 25829a2..d0df4d6 100644
--- a/_plugins/add-anchor-to-header-from-header-id.rb
+++ b/_plugins/add-anchor-to-header-from-header-id.rb
@@ -3,7 +3,7 @@ Jekyll::Hooks.register [:documents, :pages], :post_render do |doc|
doc.output =
doc.output.gsub(
/<h([1-6])(.*?)id="([\w-]+)"(.*?)>(.*?)<\/h[1-6]>/,
- '<a class="header-anchor" id="\3-header-anchor" href="#\3"><h\1\2id="\3"\4>\5<img class="simple-icon" src="/images/link.svg" aria-hidden="true" /></h\1></a>'
+ '<span class="header-anchor"><h\1\2id="\3"\4>\5</h\1><a href="#\3"><img class="simple-icon" src="/images/link.svg" aria-hidden="true" /></a></span>'
)
end
end