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

Nested helpers in .hbs not supported. #117

Open
ofauchon opened this issue Oct 16, 2019 · 2 comments
Open

Nested helpers in .hbs not supported. #117

ofauchon opened this issue Oct 16, 2019 · 2 comments

Comments

@ofauchon
Copy link

ofauchon commented Oct 16, 2019

While testing journey with 'paperleaf' theme, I found out that "Nested Helpers" are not working properly in comments like :

{{!-- jQuery needs to come before `{{ghost_foot}}` so that jQuery can be used in code injection --}}

It fires the following error: :

#### compileTemplateFromFile( /home/x/go/src/github.com/kabukky/journey/content/themes/paperleaf/default.hbs )
#### compileTemplate(name: default )
panic: runtime error: slice bounds out of range [855:774]

goroutine 1 [running]:
github.com/kabukky/journey/templates.findHelper(0xc000168500, 0x4d3, 0x4d3, 0xc0000f8800, 0x8, 0x8, 0xc000168500, 0x4d3, 0x4d3, 0x0, ...)
        /home/x/go/src/github.com/kabukky/journey/templates/generation.go:97 +0xb24

In this case, the faulty line is only a comment, so deleting it for the.hbs solves the problem.

Olivier

@assistcontrol
Copy link

The Casper theme also causes this panic. If fixing this bug isn't a priority, perhaps the docs should be updated not to recommend installing Casper.

@ofauchon
Copy link
Author

ofauchon commented Sep 3, 2020

Hi.
Is the project still maintained and alive ?
I can't see much commits in the past day/month

Thanks

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

2 participants