-
-
Notifications
You must be signed in to change notification settings - Fork 203
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tp.frontmatter does not respect "quotation marks" --> " #1282
Comments
You can wrap it in quotes like this as a workaround.
|
You're right, instead of:
:/ :D |
You're right! For list properties, you can do this to wrap each entry in quotes. <% tp.frontmatter["category-example"].map(prop => `"${prop}"`) %> |
Hey Zachatoo, output: Do you have a similar epic-code hack, that puts all of those list-values in quotation marks AND puts them on a new line? from:
to:
… but written with a tp.frontmatter extraction template. BTW are you a dev of the templater plugin, or just a hyper active github user? |
Right, needs to be wrapped in [<% tp.frontmatter["category-example"].map(prop => `"${prop}"`) %>]
Could do something like this <% tp.frontmatter["category-example"].map(prop => `\n - "${prop}"`) %> |
I'm the current maintainer of Templater, so yes I add features and fix bugs as I have time |
This seems to work, I got a correct output one time (only leaving Thank you Zachatoo! |
May be a user script, though we can continue that conversation over here
Good idea, I'll add a few more examples |
Added an example to the docs, now doesn't have the <% tp.frontmatter.categories.map(prop => ` - "${prop}"`).join("\n") %> |
Describe the bug
I build a template that should update my old metadata for a file.
Example:
I have a file with the property tag ->
category-example: "[[link]]"
the quotation marks don't get recognized with the
<% tp.frontmatter["category-example"] %>
commandExpected behavior
category-example: "[[link]]"
but what I get instead is:
category-example: [[link]]
The text was updated successfully, but these errors were encountered: