You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have to turn off VS code formatting to edit the template file.
You can take a look a the file by VS code default formatter. pwd_template_after_formatted_by_VSCode.zip
The text was updated successfully, but these errors were encountered:
Thanks for reporting. This makes sense - the password template is a template file and the templating style isn't standard, it's just replacing {special_key} with some specific text. This means the password_template.html file isn't meant to be valid html (before replacement) and contains invalid javascript, so when VS code or any IDE tries to "fix it" it risks messing things up.
The official recommendation is to not run automatic code formatting on the password template (or to fix it manually afterwards each time).
That being said, I made a patch that makes the templating engine a little more flexible - in your example the breaking change was just VS code adding spaces between brackets { special_key }. With this patch your example file now works, but please consider it unofficial behavior.
If there are standard ways of telling auto formatters to ignore a chunk of code I could be open to adding those around the relevant parts, but I guess there will be different for different tools (prettier, vs code, webstorm...) so I don't know if that would really work. Let me know if you have suggestions there.
I have to turn off VS code formatting to edit the template file.
You can take a look a the file by VS code default formatter.
pwd_template_after_formatted_by_VSCode.zip
The text was updated successfully, but these errors were encountered: