-
Notifications
You must be signed in to change notification settings - Fork 12
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
[Bug] With invalid hbs, prettier will transform <template>
in source code
#43
Comments
Thanks for the report! I'm currently swamped with another project but I will look into this ASAP. In the meantime, if you (or someone else following along) have time, could you add a test following these instructions and link here? With regular JS/TS, when there is a syntax error, Prettier appears to be a no-op but will log an error. Also if you have time you could see if this throws an error we can catch: https://github.com/gitKrystan/prettier-plugin-ember-template-tag/blob/main/src/print/template.ts#L32 |
Thanks for the references! I'll see if I can work on this next week! |
Thanks. Prettier swallows errors pretty aggressively, so I am hoping we can find something somewhere to catch! |
@simonihmig I released a quick fix for this (v0.3.2). It's still a little broken in that it seems to add a new new-line after every save (#49). 😂 But this is way less annoying than the original de-sugaring bug, and I'm out of time for fixing stuff on this library this week, so I shipped it. 🚀 |
Thanks for the report. Unfortunately, I am unable to reproduce this issue with 0.3.2. Can you answer the following questions for me?
|
@gitKrystan thanks for your reply. Here's my info:
|
@jurgenwerk Unfortunately, I'm still unable to reproduce, so I have a few more questions: Do you have Does Do any of the fixes suggested in Issue #38 help you? |
@gitKrystan yes, I had |
🐞 Describe the Bug
When hbs inside
<template>
is invalid, prettier will transform<template>
in the source file to its internal representation format (__GLIMMER_TEMPLATE()
)🔬 Minimal Reproduction
<template>
tag that contains invalid hbs syntax, like this:😕 Actual Behavior
🤔 Expected Behavior
No reformatting happens,
<template>
is not transformed.🌍 Environment
➕ Additional Context
The text was updated successfully, but these errors were encountered: