From e181acb63c42a51b92ec3f0189d1b06c93207361 Mon Sep 17 00:00:00 2001 From: gsabin Date: Mon, 17 Feb 2025 12:27:49 +0100 Subject: added examples --- _extensions/Example/quartoFilterDraft.lua | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to '_extensions/Example/quartoFilterDraft.lua') diff --git a/_extensions/Example/quartoFilterDraft.lua b/_extensions/Example/quartoFilterDraft.lua index e69de29..e084876 100644 --- a/_extensions/Example/quartoFilterDraft.lua +++ b/_extensions/Example/quartoFilterDraft.lua @@ -0,0 +1,14 @@ +function Pandoc(doc) + -- This function will process the entire document + for _, el in pairs(doc.blocks) do + if el.t == "Para" then + for _, inline in pairs(el.content) do + if inline.t == "Str" and inline.text:match("%[@%a+%]") then + -- This is a simple detection for semantic annotations + print("Found semantic annotation: " .. inline.text) + end + end + end + end + return doc +end \ No newline at end of file -- cgit v1.2.3