zed-industries / zed

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
https://zed.dev
Other
49.41k stars 3k forks source link

Zed Adds Spaces In Front of URLs When Saving #4704

Closed ymolodtsov closed 1 day ago

ymolodtsov commented 1 year ago

Check for existing issues

Describe the bug / provide steps to reproduce it

When saving an .html document with some templates, Zed adds spaces in front of links, effectively killing them. Seems to be connected with Zed adding breaks to some tags and structures.

Before Cmd-S CleanShot 2023-06-13 at 08 41 35@2x

After Cmd-S CleanShot 2023-06-13 at 08 41 41@2x

The expected behavior would be Zed not touching anything unless it was specifically requested.

Environment

Zed: v0.89.2 (stable) OS: macOS 13.0.0 Memory: 16 GiB Architecture: MacOS

If applicable, add mockups / screenshots to help explain present your vision of the feature

No response

If applicable, attach your ~/Library/Logs/Zed/Zed.log file to this issue.

If you only need the most recent lines, you can run the zed: open log command palette action to see the last 1000.

No response

notpeter commented 4 months ago

Yep, the HTML mode is not going to have a good time trying to format your templatized HTML. As a workaround you can disable format_on_save in your settings.

Which templating engine are you're using?

There are some existing issues tracking support for various templating languages: