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

Formatting HTML with umlauts #4

Open
Harper04 opened this issue Feb 18, 2020 · 7 comments
Open

Formatting HTML with umlauts #4

Harper04 opened this issue Feb 18, 2020 · 7 comments

Comments

@Harper04
Copy link

Hi, thanks for this awesome Plugin!

Unfortunately I have a small Problem:

The Formatter just stops if it sees something like this:

<%= label f_loc, :street,  "Straße", class: ""  %>

This works

<%= label f_loc, :street,  "Strasse", class: ""  %>

So I think non-ascii things like German do not work correctly.

@alvesoaj
Copy link
Owner

alvesoaj commented Feb 2, 2021

I will check it

@alvesoaj
Copy link
Owner

alvesoaj commented Feb 2, 2021

Hey, i did some tests with:

<h1>Test</h1>
<div>
  <label><%= label f_loc, :street,  "Straße", class: ""  %></label>
</div>

And it is working fine. May it be some charset config of your VSCode?

@Harper04
Copy link
Author

Harper04 commented Feb 2, 2021

I really don't know. My Charset is utf-8.
Thing is:

  • if i run htmlbeautifier from zsh it works
  • if I run run htmlbeautifier from a node process (> cp.spawn('htmlbeautifier',['--stop-on-errors','./lib/gram_web/live/bla.html.eex'])) it works!

if I use the extension (btw. elixir ls disabled) it does not work...
I even tried to disable your extension to sanity check this is the right one running the format - which I can confirm.

I have no ideas left.

@alvesoaj
Copy link
Owner

alvesoaj commented Feb 3, 2021

ok, it is really strange.

And it indicates some issue or miss config within VSCode. Well, can you test it in a fresh new VSCode instance, I mean, with a different user in your machine or in another machine. There are another extension with strange behavior?

@Harper04
Copy link
Author

Harper04 commented May 31, 2021

I just tested on another machine.
Big Sur 11.2.3.
No developer tools installed (machine of my wife).
Installed using sudo gem install htmlbeautifier
Installed newest vscode and plug-in using Extension Manager
I even typed the repro by hand

=> Same behavior 🤔

As soon as I use a „ß“ it stops working from inside VSCode. Using htmlbeautifier directly still works. VSCode logs are empty.

@alvesoaj
Copy link
Owner

alvesoaj commented May 31, 2021

It is very strange, Here in my machine I put ß and it don't break... I will do a try changing my machine language to German.

@Harper04
Copy link
Author

Language does not seem to an issue. mine is English; hers is German. Maybe the Region Setting? : - /
I am thinking that something is breaking in the pipeline buffer -> node process -> shell command -> htmlbeautifier

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

No branches or pull requests

2 participants