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

hbs: update comment to remove line break #59

Merged
merged 1 commit into from
Apr 13, 2023

Conversation

lgfa29
Copy link
Contributor

@lgfa29 lgfa29 commented Apr 13, 2023

🛠️ Description

Template languages that generate HTML files, like Handlebars, are often sensitive to whitespace, so adding a line break may change how a page is rendered.

This commit adds a ~ at the end of the comment as a whitespace control so the rendering engine removes the additional line break added by the license header comment.

🔗 External Links

RELPLAT-703

👍 Definition of Done

  • New functionality works?
  • Tests added?

🤔 Can be merged upon approval?

Template languages that generate HTML files, like Handlebars, are often
sensitive to whitespace, so adding a line break may change how a page is
rendered.

This commit adds a `~` at the end of the comment as a whitespace control
so the rendering engine removes the additional line break added by the
license header comment.
@lgfa29 lgfa29 requested a review from a team April 13, 2023 14:19
Copy link
Contributor

@dlaguerta dlaguerta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for adding this!

@alex-ju
Copy link
Member

alex-ju commented Aug 8, 2023

This change seems to be making Babel parser unhappy in Cloud UI so we needed to tweak the Design System code to remove the trailing tilde coming from automation. Is it possible that the whitespace management syntax is not valid for comments? 🤔 In #16861 I can see you have an explicit new line after each comment; would removing that space achieve a similar outcome?

@zofskeez
Copy link

zofskeez commented Sep 8, 2023

We're seeing the same thing in Vault that @alex-ju reported after the license headers were recently updated. It looks like there is an open issue related to the ember-template-compiler outputting a meaningless warning. It's adding a lot of noise to the build output so we're also wondering if the comment could be changed to a one-liner with the tilde removed?

@alex-ju alex-ju mentioned this pull request Nov 24, 2023
2 tasks
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.

4 participants