From 9eb58da4307e39556ec600f581dbf49ef3a6c188 Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Sat, 15 Aug 2020 16:18:35 -0300 Subject: Adapt add-anchor-to-header-from-header-id to handle Now the hook creates a wrapping to put the header and it's existing link inside, and add the new anchor as a sibling. --- _plugins/add-anchor-to-header-from-header-id.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '_plugins/add-anchor-to-header-from-header-id.rb') 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]>/, - '\5' + '\5' ) end end -- cgit v1.2.3