madskristensen / JavaScriptPrettier

A Visual Studio extension
Other
157 stars 30 forks source link

Some special chars are garbled #39

Open HolgerJeromin opened 2 years ago

HolgerJeromin commented 2 years ago

Installed product versions

Description

Non-breaking spaces are garbled.

Steps to recreate

  1. open a js file. Enter a narrow no-break space for example from german wikipedia page or this text: '▕ ▏'
  2. run prettier from command line (node_modules/.bin/prettier.cmd --write .) is fine
  3. run prettier from visual studio contextmenu of this extension

Current behavior

The extension creates from the valid string '▕ ▏' the new string '???'.

image => image

Expected behavior

should be preserved as it is with the command line

ref #2