Skip to content
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

issues with javascript expressions inside mustaches #139

Closed
yeedle opened this issue Apr 18, 2018 · 0 comments
Closed

issues with javascript expressions inside mustaches #139

yeedle opened this issue Apr 18, 2018 · 0 comments

Comments

@yeedle
Copy link

yeedle commented Apr 18, 2018

This might be an issue with the node version I'm using but I'm not sure.

Using an expression as follows works fine

{{ new Date($page.frontmatter.date) }}

However, if I pass the date as a string directly like so

{{ new Date("2017-05-08 09:50:00 EST") }}

the build fails. The error I get is that I should

  - avoid using JavaScript keyword as property name: "new"
  Raw expression: {{ new Date("2017-05-08 09:50:00 EST") }}

Do expressions not support passing arguments as strings to constructors?

@yeedle yeedle changed the title issues with javascript expressions issues with javascript expressions inside mustaches Apr 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant