AnWeber / httpbook

Quickly and easily send REST, Soap, GraphQL, GRPC, MQTT and WebSocket requests directly within Visual Studio Code
https://httpyac.github.io/
MIT License
57 stars 4 forks source link

Httpbook formatting broken by saving in VScode 1.76.1 #82

Closed sibbowulf closed 1 year ago

sibbowulf commented 1 year ago

Hi,

After upgrading to VScode 1.76 (code_1.76.1-1678294265_amd64.deb) on Ubuntu 22.04 LTS my httpyac files in httpbook format gets broken when loaded into VScode. The requests get truncated in httpbook whereas disabling the httpbook extension and using only httpyac in VScode works normally.

httpyac looks like this:

GET http://{my_url}}/my/api/v1 /config

in httpbook this is truncated to: my_url}}/my/api/v1 /config

Maybe some control code change in VScode with undesired side effects ?

AnWeber commented 1 year ago
image

same. I will take a look. I thought at first that I accidentally broke the api to vscode-httpyac. But seems at first sight not so. Ok, not the VSCode update but a change from me. I am looking but you can also see the error in vscode-httpyac but there it has no effect. Parsing for source property seems broken.

image
AnWeber commented 1 year ago

I accidentally used the region start line for the offset as well. The bug came in v6.3.0 of httpyac. I have fixed it and added a test. Please install vscode-httpyac@6.3.2. This also fixes httpbook

sibbowulf commented 1 year ago

Thank you.

Verified as working in my environment also. Thank you for the quick fix.