Dear Folks,
I am trying to convert YAML data to a string that can be decoded by the Typst yaml.decode() function.
This is a simplified version of my YAML which I am assigning to a variable
from_name: "My Family"
date: "31 December 2023"
to_name: "Another Family"
subject: "My subject"
closing: "Sincerely yours,"
]
#import "letter-template-yaml.typ": letter_template_yaml
#show: my_letter => letter_template_yaml(
letter: yaml.decode(letter_data),
my_letter
)```
When I use `yaml.decode(letter_data)` I get the error "expected string, not content".
My question is how would I convert the YAML data into a string that `yaml.decode()` can understand?
I know I can put the YAML into a file and pass that which works great with the YAML I have above, but I would prefer to get the above working.
Many thanks,