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

exposing line numbers on MustacheNodes/BlockNodes/ContentNodes/etc during Handlebars.parse #691

Closed
fivetanley opened this issue Dec 28, 2013 · 1 comment · Fixed by #692

Comments

@fivetanley
Copy link
Contributor

Wondering if there's any interest in this. Here's my current use case:

I need to go through Handlebars templates and extract keys for i18n. Basically, it works like this:

Given this sample template:

{{#t "foo"}}Foo{{/t}}

The extracted keys would be:

{ foo: "Foo" }

So far, Handlebars.parse and friends have been extremely easy to work with.

But, we do have some custom validation rules and being able to give the person running my extractor a line number would be extremely useful.

I'm opening this issue to gauge interest. I'd be happy to take a stab at implementing the pull request if I can figure it out.

fivetanley pushed a commit to fivetanley/handlebars.js that referenced this issue Dec 29, 2013
@kpdecker
Copy link
Collaborator

kpdecker commented Jan 2, 2014

Released in 1.3.0

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

Successfully merging a pull request may close this issue.

2 participants