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

Handlebars template fixes #90

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

JanJakes
Copy link

@JanJakes JanJakes commented Jan 21, 2024

When setting up a custom theme, I discovered multiple issues in the Handlebars templates. I'm adding fixes for all of them. I also added a few optional improvements (mainly related to using Prettier with angular parser to format .hbs files), happy to update/drop any of them, if needed. The commits describe the changes:

  1. Fix wrong Subscribe/Account button condition
  2. Fix unmatched tag in signup.hbs
  3. Replace invalid {{^if ...}} with {{#unless ...}}
  4. Remove unmatched closing ")" in sizes attribute
  5. Use single quotes in helper arguments
  6. Move conditions inside attribute values
  7. Remove tags from comments (they can confuse some parsers)
  8. Remove trailing whitespace

The `{{^if @member}}` syntax doesn't seem to be a valid Handlebars.js code. The if/else statement uses `{{#if @member}}`, while the inverse would be `{{#unless @member}}`. In this case, we have both `if` and `else` branches, so we can simply switch them.
There was a closing </ul> tag forgotten in the template, without any corresponding opening tag.
This improves compatibility with Prettier's `angular` parser.
This improves compatibility with Prettier's `angular` parser.
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 this pull request may close these issues.

1 participant