Author Topic: Make var expansion more flexible  (Read 1323 times)

Offline jrp

  • Member
  • **
  • Posts: 52
    • View Profile
Make var expansion more flexible
« on: September 07, 2019, 11:04:23 AM »
At present, it doesn't seem to be possible to format fields containing vars according to whether a var is set or not.  For examples, I would like to include some of the location / event-related vars to generate a default description but not include the following comma if the var is undefined.

One way of achieving this would be to make it possible to say "{event, }", for example, and if the var {event} is unset, then the ", " would not be macro expanded either.

There are some design questions, such as "how do you recognise var names within {}?" (Eg, the var name is the first contiguous sequence of lower-case alpha chars within the {}" but you could be more restrictive.