aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgsabin <sabinghimire071@gmail.com>2025-02-27 11:14:21 +0100
committergsabin <sabinghimire071@gmail.com>2025-02-27 11:14:21 +0100
commit0c18ad85755f06002ce2088125daf217402f011f (patch)
treeb226538e00460a57cda4805eb47ff60b41b1b81b
parent2532a17eda917996481441260839ecfa6700961b (diff)
start of the prototype detecting and removing curly braces
-rw-r--r--_extensions/protoExtension/_extension.yml7
-rw-r--r--_extensions/protoExtension/proto.lua14
-rw-r--r--_proto.qmd32
3 files changed, 52 insertions, 1 deletions
diff --git a/_extensions/protoExtension/_extension.yml b/_extensions/protoExtension/_extension.yml
new file mode 100644
index 0000000..f00b3c5
--- /dev/null
+++ b/_extensions/protoExtension/_extension.yml
@@ -0,0 +1,7 @@
+name: protoExtension
+title: Prototype for html
+version: 1.0.0
+quarto-required: ">=1.3.0"
+contributes:
+ filters:
+ - proto.lua
diff --git a/_extensions/protoExtension/proto.lua b/_extensions/protoExtension/proto.lua
new file mode 100644
index 0000000..cb29c31
--- /dev/null
+++ b/_extensions/protoExtension/proto.lua
@@ -0,0 +1,14 @@
+-- Function to replace variations of Leandre with Léandre.
+function Str(el)
+ i , j = string.find(el.text,"{")
+ if i ~= nil then a = string.find(el.text,"}")
+ print(i)
+ print(string.sub(el.text,i,a))
+ b = string.sub(el.text,0,i-1)
+ c = string.sub(el.text,a+1,-1)
+ el.text = b .. c
+
+ end
+
+ return el
+end
diff --git a/_proto.qmd b/_proto.qmd
index d3ed7e5..0af54c4 100644
--- a/_proto.qmd
+++ b/_proto.qmd
@@ -1 +1,31 @@
-My name is [Sabin Ghimire]{:name}. \ No newline at end of file
+---
+title: "Test Document"
+format: html
+filters:
+ - protoExtension
+---
+
+Here is Leandre writing some text.
+My name is [Sabin Ghimire]{:name} and you can call me at [1-800-555-0199]{:telephone}.
+My favorite animal is the [Lioner]{ov:preferredAnimal}.
+
+
+# tomorrow's meeting list
+## {.schema:Event} Meeting Details
+
+- Date: [2/27]{schema:startDate}
+- Location: [Library]{schema:location}
+- Attendees:
+ - Leandra
+ - jonas
+ - [Sabin](https://example.com/tim){schema:attendee}My name is [Sabin Ghimire]{:name} and you can call me at [1-800-555-0199]{:telephone}.
+
+# tomorrow's meeting list
+## {.schema:Event} Meeting Details
+
+- Date: [11/10]{schema:startDate}
+- Location: [Library]{schema:location}
+- Attendees:
+ - Alice
+ - Bob
+ - [Tim](https://example.com/tim){schema:attendee} \ No newline at end of file