daaain / Handlebars

Fullest Handlebars.js templating support for Sublime Text 2 / 3. Also drives syntax colouring on Github and in Visual Studio Code. Install from: https://packagecontrol.io/packages/Handlebars.
MIT License
301 stars 48 forks source link

@index为undefined #100

Closed xibolun closed 6 years ago

xibolun commented 6 years ago

{{#each array}} {{log @index}} {{/each}}

i logged @index, its value is undefined; also @key @last.....

daaain commented 6 years ago

Hey @kedadiannao220,

I'm not sure if I understand the issue, are you seeing this output in your browser console?

This package only provides syntax highlighting for Handlebars in text editors, so the compilation happens somewhere else in your tooling.

I'm close this issue as I think it's outside of scope, but feel free to comment and in case it's something this library is breaking I'm happy to reopen.

xibolun commented 6 years ago

hi @daaain, I am a Handlebars user, other syntaxes used good, like if、else、or、eq; only these @index @key @last have problems, i don't know why, i checked the chrome console, it logged undefined;

daaain commented 6 years ago

Hey @kedadiannao220,

This repository if only for the syntax colouring in code editors, so it has nothing to do with what you see on the browser console.

The library which compiles Handlebars is here: https://stackoverflow.com/questions/tagged/handlebars.js

But this question you should really post on Stackoverflow: https://stackoverflow.com/questions/tagged/handlebars.js

Preferably with a code example on JSFiddle which demonstrates the error.