Until parametrization is implemented for LC 9 one could use
the following generalization of Andre's method for David.
This is still fast enough because replace is so fast in LC.
David would call merge2(string, "{{", "}}").
To make merge xml safe use e.g. merge2(string,,,"<1>","<2>")
Of course you
Until parametrization is implemented for LC 9 one could use
the following generalization of Andre's method for David.
This is still fast enough because replace is so fast in LC.
David would call merge2(string, "{{", "}}").
To make merge xml safe use e.g. merge2(string,,,"<1>","<2>")
Of course you
That would be great Mark :)
Andre the general function I use for munging text uses regular expressions
as my head exploded long ago with too many custom string munging functions
:)
*command* fedwiki_MergeCurlyArray @templateArray, itemID, curlyArray
>
*put* fedwiki_GetStoryItemText (templateArray
On 2019-01-18 09:01, David Bovill via use-livecode wrote:
I would love to be able to change the characters that merge uses -
especially from “[[..]]” to “{{...}}”.
Quite a lot of templating uses curly brackets - and I especially want
to
use it for wiki style templates which can’t use square bra
eheheheheh let me throw this hack in here and run
function davidsMerge pText
replace "[[" with "[safe[" in pText
replace "]]" with "]safe]" in pText
replace "{{" with "[[" in pText
replace "}}" with "]]" in pText
get the merge of pText
replace "[safe[" with "[[" in it
replac
I don’t know the setting but might a line or two of preprocessing allow LC to
replace the (specific) strings in the template with curly brackets into ones
with square brackets for processing?
Best,
Keith
> On 18 Jan 2019, at 09:33, Richard Gaskin via use-livecode
> wrote:
>
> David Bovill
David Bovill wrote:
> I would love to be able to change the characters that merge uses -
> especially from “[[..]]” to “{{...}}”.
>
> Quite a lot of templating uses curly brackets - and I especially want
> to use it for wiki style templates which can’t use square brackets as
> they are used for i