Skip to content

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

@fivetanley

Description

@fivetanley

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions