-
Notifications
You must be signed in to change notification settings - Fork 26
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
Ruby expressions are getting replaced with <eext> #44
Comments
have the same issue |
hey guys, should be fixed in a newly released v0.2.0 |
Which prettier version are you using? 🤔 if it's 2.3 downgrade it to 2.2.x. If it's not that, then I'm gonna have a look at it tomorrow 😓 |
Downgrading to 2.2.0 helped, thanks! Current config: |
Even with the latest version I still see this happening in packages: input: output: |
The same issue with newest 0.4.0. This time all <%= ... %> get replaced with |
The following <script>
<% if CONSTANT_2 == 'asd' %>
var a = '<%= CONSTANT_1 %>'
<% else %>
var a = '<%= CONSTANT_3 %>'
<% end %>
</script> On prettier 2.2.0 and 2.2.1, it produces the following: <script>
<% if CONSTANT_2 == 'asd' %>
var a = '<%= CONSTANT_1 %>'
</eext1> <eext3>
var a = '<%= CONSTANT_3 %>'
<% end %>
</script> |
This continues to be an issue in 0.4.0. Here's the dev deps from my packson.json "devDependencies": {
"@prettier/plugin-ruby": "^1.6.1",
"prettier": "^2.4.0",
"prettier-plugin-erb": "^0.4.0"
} I've confirmed that this happens in my terminal [EDIT] For reference, per @karthikkasturi's comment above, version locking these specific versions of each dep fixes the issue: "devDependencies": {
"@prettier/plugin-ruby": "1.5.5",
"prettier": "2.2.0",
"prettier-plugin-erb": "0.2.0"
} |
Same issue with the more recent versions, except is was happening with "devDependencies": {
"@prettier/plugin-ruby": "^3.1.2",
"prettier": "^2.6.2",
"prettier-plugin-erb": "^0.4.0"
} Locking the versions from the post above seems to resolve that issue, but created another issue, reported elsewhere, replacing {
"devDependencies": {
"@prettier/plugin-ruby": "1.5.5",
"prettier": "2.2.0",
"prettier-plugin-erb": "0.4.0"
}
} |
I'm seeing the same issue with:
|
Any solution here except downgrading way back to 2.2.0? I am having the same issue with the following versions: "@prettier/plugin-ruby": "^3.2.2",
"prettier": "^2.8.0",
"prettier-plugin-erb": "^0.4.0" |
Hi @adamzapasnik - this is pretty serious issue since it can overwrite/corrupt/undo people's code. May I suggest placing a very loud warning on the readme or taking this plugin off the VS Code marketplace until it is fixed. Especially since erb files can be treated as HTML but for the handling of these expressions, which is how I came across the plugin. |
I version locked to the following per @mason-stewart's suggestion:
And the following line:
was changed to:
I'm not saying this to be mean, but this is a poor enough introduction to this plugin that I'm just going to abandon it. |
Absolutely bizarre... my installation was working for weeks up until today. Seeing My Did something change with a VSCode update that caused everything to break? |
I have the same when I've installed the "@prettier/plugin-ruby": "1.6.1",
"@shopify/prettier-plugin-liquid": "1.0.6",
"prettier-plugin-erb": "0.4.0" |
<%= image_with_path "path" %>
is getting replaced with
<eext1/>
The text was updated successfully, but these errors were encountered: