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

commented out code triggers failure #121

Open
frantzypants opened this issue Jul 26, 2018 · 2 comments
Open

commented out code triggers failure #121

frantzypants opened this issue Jul 26, 2018 · 2 comments

Comments

@frantzypants
Copy link

When you upload a theme that has commented out code that contains outdated helpers, e.g.

<!-- <header class="main-header {{#if @blog.cover}}" 
style="background-image: url({{@blog.cover}}){{else}}no-cover{{/if}}"> -->

gscan will still assume the theme is incompatible until you've made the change to the code in the comment. I understand it's important to have up-to-date helpers/code, but given it's commented out shouldn't it still pass or be able to activate on a blog - and this be presented as a warning instead?

@kirrg001
Copy link
Contributor

Thanks @frantzypants!

Yeah agree, GScan shouldn't detect commented out code or show a warning instead.

@kevinansfield
Copy link
Member

I think it will be important to distinguish between HTML comments and Handlebars comments.

The above code has HTML comments so the handlebars code is still being run and has a chance of causing errors. I imagine the comment detecting rules would need to be per-helper to determine if it's "kind of ok" or "definitely not ok" for the handlebars code to be run within a HTML comment?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants