Re: Feature request: merge function!

2019-01-18 Thread hh via use-livecode
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

Re: Feature request: merge function!

2019-01-18 Thread hh via use-livecode
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

Re: Feature request: merge function!

2019-01-18 Thread David Bovill via use-livecode
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

Re: Feature request: merge function!

2019-01-18 Thread Mark Waddingham via use-livecode
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

Re: Feature request: merge function!

2019-01-18 Thread Andre Alves Garzia via use-livecode
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  

Re: Feature request: merge function!

2019-01-18 Thread Keith Clarke via use-livecode
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

Re: Feature request: merge function!

2019-01-18 Thread Richard Gaskin via use-livecode
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

Feature request: merge function!

2019-01-18 Thread David Bovill via use-livecode
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 internal links. Not sure of the