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/example.md | 7 +++++++ _extensions/Example/quartoFilterDraft.lua | 14 ++++++++++++++ 2 files changed, 21 insertions(+) (limited to '_extensions/Example') diff --git a/_extensions/Example/example.md b/_extensions/Example/example.md index e69de29..bf4efa3 100644 --- a/_extensions/Example/example.md +++ b/_extensions/Example/example.md @@ -0,0 +1,7 @@ +# Example Markdown File + +This is a **bold** text and *italic* text. + +## Another Section +- List item 1 +- List item 2 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