aboutsummaryrefslogtreecommitdiff
path: root/_extensions/Example/quartoFilterDraft.lua
blob: e084876bd084b258de80637f8e4c72603ebcbf56 (plain)
  1. function Pandoc(doc)
  2. -- This function will process the entire document
  3. for _, el in pairs(doc.blocks) do
  4. if el.t == "Para" then
  5. for _, inline in pairs(el.content) do
  6. if inline.t == "Str" and inline.text:match("%[@%a+%]") then
  7. -- This is a simple detection for semantic annotations
  8. print("Found semantic annotation: " .. inline.text)
  9. end
  10. end
  11. end
  12. end
  13. return doc
  14. end