Surround with HTML tags with attributes puts attributes in closing tag
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 15.2k
- Forks
- 1.5k
- Avg merge
- 3d 18h
- Merged PRs (30d)
- 6
Description
Describe the bug
It used to be that surrounding (e.g.) xyz with <a href="…"> would correctly generate <a href="…">xyz</a>, however this functionality seems to have been broken when surround started to use the top bar instead of the status bar (sorry, I don’t know what these are really called in VS Code terms).
To Reproduce
- insert the text
xyz - type
viwS<a href="">, then Enter - the editor reads
<a href="">xyz</a href="">
Expected behavior
- insert the text
xyz - type
viwS<a href="">, then Enter - the editor reads
<a href="">xyz</a>
Environment (please complete the following information):
Version: 1.61.0 (user setup)
Commit: ee8c7def80afc00dd6e593ef12f37756d8f504ea
Date: 2021-10-07T18:13:09.652Z
Electron: 13.5.1
Chrome: 91.0.4472.164
Node.js: 14.16.0
V8: 9.1.269.39-electron.0
OS: Windows_NT x64 10.0.22471
VSCodeVim version: 1.21.8.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue in VS Code with the viwS<a href=""> sequence described in the report and compare the generated opening and closing tags. Trace the surround behavior associated with the top bar, then verify that attributes remain only in the opening tag and that the expected output is produced.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100