From 0c18ad85755f06002ce2088125daf217402f011f Mon Sep 17 00:00:00 2001 From: gsabin Date: Thu, 27 Feb 2025 11:14:21 +0100 Subject: start of the prototype detecting and removing curly braces --- _extensions/protoExtension/_extension.yml | 7 +++++++ _extensions/protoExtension/proto.lua | 14 ++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 _extensions/protoExtension/_extension.yml create mode 100644 _extensions/protoExtension/proto.lua (limited to '_extensions') 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 -- cgit v1.2.3