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

Partials with integers as name cause parsing error #36

Closed
tommedema opened this issue Sep 14, 2013 · 5 comments
Closed

Partials with integers as name cause parsing error #36

tommedema opened this issue Sep 14, 2013 · 5 comments

Comments

@tommedema
Copy link

Steps to reproduce:

  1. create partial in views/partials/errors/500.js
  2. use partial in a view, e.g. {{> errors/500}}

The result is:

[Error: Parse error on line 8:
...er>    {{> errors/500}}    {{> error
---------------------^
Expecting 'ID', got 'INTEGER']

On a side note, there is no documentation regarding the use of partials.

@ericf
Copy link
Owner

ericf commented Sep 14, 2013

There is documentation regarding partials, it's in the README, and there's even an example app. The only thing this package does is load the partials from the specified directory(s) and hands them over the Handlebars to render.

The error you're seeing is Handlebars not correctly parsing the name of your partial: handlebars-lang/handlebars.js#84

@ericf
Copy link
Owner

ericf commented Sep 14, 2013

Here's an example of the problem: http://jsbin.com/UQoHOTI/1/edit?js,console,output

@tommedema
Copy link
Author

Excellent, thanks for the explanation

@ericf
Copy link
Owner

ericf commented Sep 14, 2013

Looks like a temp fix would be to prefix with a letter: http://jsbin.com/UQoHOTI/2/edit?js,console,output

@tommedema
Copy link
Author

I did do that. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants