Closed hgiesel closed 4 years ago
Supported since 3c105d856a04ac0e407dab8a454b2cce62a4ba88.
In order to set custom delimiters, you must call closet.setDelimiters('[[', '::', ']]')
, where [[
is the open delimiter, ::
the initial argument separator, and ]]
the closing delimiter.
how would i go about this? I'm not sure what you mean by call.
Okay, so I revamped it, and thoroughly tested it this time.
Here's what you're gonna have to do:
You go into the "Assets..." menu, select "Closet Setup"
At an empty spot in the code, you paste this:
const delimiters = {
open: '<<',
sep: '::',
close: '>>'
}
As you can see, this contains the delimiters you want to use, <<
corresponding to <<
, etc.
return [[
elements,
memoryMap,
filterManager,
]]
into:
return [[
elements,
memoryMap,
filterManager,
{ delimiters },
]]
Now it should work. Tell me, if it works out for you.
I'll test it a soon as I can, but I'm at work for the next 7 hours.
Ok its working with <<>> fine. On my cards i ended up using {{ }} but changing the config to
const delimiters = {
open: '{{',
sep: '::',
close: '}}'
}
I get this error in preview.
Front template has a problem: Found '{{', sep: '::', close: '}}', but there is no field called ' '' More information
I can switch over my cards to use << >> though
You can circumvent this error by using backslashes:
const delimiters = {
open: '\{\{',
sep: '::',
close: '\}\}'
}
that worked thank you. you're awesome.
Specifically
TAG_OPEN
,TAG_CLOSE
,ARG_SEP
.