usebruno / bruno

Opensource IDE For Exploring and Testing Api's (lightweight alternative to postman/insomnia)
https://www.usebruno.com/
MIT License
27.71k stars 1.28k forks source link

Comment keybind no longer supports XML formatted comment #3519

Open jdunster-bw opened 4 days ago

jdunster-bw commented 4 days ago

I have checked the following:

Describe the bug

I often use the ⌘ + / keybind to comment out certain parts of a request that I'm debugging. I recently updated my Bruno version to the latest version though (1.34.2) and this seems to have broken that functionality for XML. Prior to the upgrade, I was using version 1.23.0.

Previously, when using the keybind, it would comment out sections in XML style, wrapping it in <!-- --> or removing the wrapping from a commented-out line or section. Now, it just adds or removes // from the start of the line which produces invalid XML. This is especially annoying in existing Bruno files which have commented-out lines that I'd like to include, as now they need to be commented/uncommented manually.

I suspect this was introduced by #2634, as this made some changes meant to allow the comment keybind to work with JSON, but the behavior might be spilling over to XML editing as well.

.bru file to reproduce the bug

Example Collection.json

Screenshots/Live demo link

Behavior before updating:

https://github.com/user-attachments/assets/df7adbb4-af7f-4c26-addd-47d26e799446

Behavior after updating:

https://github.com/user-attachments/assets/936b3a4a-5b7b-48eb-91c1-8d1eef50bf9e

sreelakshmi-bruno commented 3 days ago

Hi @jdunster-bw, thanks for reporting this issue. We'll work on it and will post the updates here.