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

Inconsistency between api doc and implementation #1237

Closed
blikblum opened this issue Jul 21, 2016 · 3 comments
Closed

Inconsistency between api doc and implementation #1237

blikblum opened this issue Jul 21, 2016 · 3 comments

Comments

@blikblum
Copy link
Contributor

I'm using the compiler API and the specs as references to port handlebars to pascal

The API states that BlockStatement path must be a PathExpression but the parser accepts string,number and even boolean literals in path.

The examples below works:

{{#1}}ss{{else}}xx{{/1}} 
{{#true}}ss{{else}}xx{{/true}}

The current implementation gives the expected behavior and the doc is misleading?

@stevenvachon
Copy link

stevenvachon commented Jul 21, 2016

I'm pretty sure that it's due to backwards-compatibility with Mustache.

It also accepts null and undefined literals.

blikblum added a commit to blikblum/handlebars.js that referenced this issue Jul 21, 2016
As pointed in handlebars-lang#1237 BlockStatement.path accepts in practice PathExpression or Literal.  
Updates its definition to reflect this fact
@lawnsea lawnsea added the bug label Nov 23, 2016
nknapp pushed a commit that referenced this issue Mar 9, 2017
As pointed in #1237 BlockStatement.path accepts in practice PathExpression or Literal.  
Updates its definition to reflect this fact
@nknapp
Copy link
Collaborator

nknapp commented May 14, 2017

We need a spec #1277

@nknapp nknapp removed the bug label May 14, 2017
@nknapp
Copy link
Collaborator

nknapp commented May 14, 2017

The documentation has actually been updated in 8088a46. Closing

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

4 participants