From 35a01b7547ecc30a031c110d85c337a8466214f2 Mon Sep 17 00:00:00 2001
From: Ekaitz Zarraga <ekaitz@elenq.tech>
Date: Wed, 27 May 2020 00:15:18 +0200
Subject: add anchor filter for html

---
 filters/anchored-h.lua | 11 +++++++++++
 1 file changed, 11 insertions(+)
 create mode 100644 filters/anchored-h.lua

diff --git a/filters/anchored-h.lua b/filters/anchored-h.lua
new file mode 100644
index 0000000..f5cb125
--- /dev/null
+++ b/filters/anchored-h.lua
@@ -0,0 +1,11 @@
+pandoc.utils = require 'pandoc.utils'
+if FORMAT:match 'html' then
+    function Header(el)
+        local l = pandoc.Link("ΒΆ", "#"..el.identifier)
+        l.classes[1]="anchor"
+        el.content[#el.content+1] = pandoc.Space()
+        el.content[#el.content+1] = l
+        return el
+    end
+end
+
-- 
cgit v1.2.3