diff options
| author | gsabin <sabinghimire071@gmail.com> | 2025-02-27 11:14:21 +0100 |
|---|---|---|
| committer | gsabin <sabinghimire071@gmail.com> | 2025-02-27 11:14:21 +0100 |
| commit | 0c18ad85755f06002ce2088125daf217402f011f (patch) | |
| tree | b226538e00460a57cda4805eb47ff60b41b1b81b | |
| parent | 2532a17eda917996481441260839ecfa6700961b (diff) | |
start of the prototype detecting and removing curly braces
| -rw-r--r-- | _extensions/protoExtension/_extension.yml | 7 | ||||
| -rw-r--r-- | _extensions/protoExtension/proto.lua | 14 | ||||
| -rw-r--r-- | _proto.qmd | 32 |
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 @@ -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 |
