docassemble icon indicating copy to clipboard operation
docassemble copied to clipboard

Problems with defined terms under some circumstances

Open Gauntlet173 opened this issue 4 years ago • 1 comments

variable name: source
data:
  text1: {defined term}
  text2: a {defined term} that is different
---
mandatory: True
question: This question uses a ${ source['text1'] } and ${ source['text2'] }, and then the {defined term} itself.
terms:
  - defined term: this is the definition.
---

If you run the above interview on the latest version, the output looks like this:

Screenshot 2021-05-03 at 3 54 41 PM

It's not clear to me what's going on, there.

Gauntlet173 avatar May 03 '21 07:05 Gauntlet173

YAML lets you use the { and } characters to designate an inline dictionary data structure. You just need to be explicit about what you want YAML to interpret as a string:

variable name: source
data:
  text1: "{defined term}"
  text2: a {defined term} that is different

jhpyle avatar May 03 '21 11:05 jhpyle