aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeandre17 <leandre.godet@epitech.eu>2025-02-08 11:28:48 +0100
committerLeandre17 <leandre.godet@epitech.eu>2025-02-08 11:28:48 +0100
commita994ca50b12abd827d1797be3a1a41a144ee84f5 (patch)
tree07ccdb3ba1ee3aade37538f563685baee456cbb4
parent5bec6fe2a3930421080aacda577e446d185599f5 (diff)
first commit
-rw-r--r--_extensions/leandre-filter/_extension.yml8
-rw-r--r--_extensions/leandre-filter/leandre.lua12
-rw-r--r--main.qmd8
3 files changed, 28 insertions, 0 deletions
diff --git a/_extensions/leandre-filter/_extension.yml b/_extensions/leandre-filter/_extension.yml
new file mode 100644
index 0000000..03b9275
--- /dev/null
+++ b/_extensions/leandre-filter/_extension.yml
@@ -0,0 +1,8 @@
+name: leandre-filter
+title: Leandre Name Filter
+author: Léandre
+version: 1.0.0
+quarto-required: ">=1.3.0"
+contributes:
+ filters:
+ - leandre.lua \ No newline at end of file
diff --git a/_extensions/leandre-filter/leandre.lua b/_extensions/leandre-filter/leandre.lua
new file mode 100644
index 0000000..71466b0
--- /dev/null
+++ b/_extensions/leandre-filter/leandre.lua
@@ -0,0 +1,12 @@
+function Str(el)
+ quarto.log.output("Found text: " .. el.text) -- Debug line
+ if el.text:find("Leandre") then
+ quarto.log.output("Found Leandre!") -- Debug line
+ el.text = el.text:gsub("Leandre", "Léandre")
+ end
+ return el
+end
+
+return {
+ {'Str', Str}
+} \ No newline at end of file
diff --git a/main.qmd b/main.qmd
new file mode 100644
index 0000000..a33b9e4
--- /dev/null
+++ b/main.qmd
@@ -0,0 +1,8 @@
+---
+title: "Test Document"
+format: html
+filters:
+ - leandre-filter
+---
+
+Here is Leandre writing some text. \ No newline at end of file