What I’m trying to do
I’m currently working on a character sheet template set using Templater and I’m trying to get it to dynamically set the contents of a template based on what the note already has in it. The most basic example I’m trying to do is have it adjust to say “he” if the character’s a male and “she” if the character is female.
Things I have tried
I’ve tried a few variations of this:
<%*if(await tp.file.content.match("female")){%> <%"does she"%> <%*}else if(await tp.file.content.match("male")){%> <%"does he"%> <%*} %>
For whatever reason always sets the string to “does she” even if I have the word “male” set already. What am I doing wrong here?