diff --git a/src/actions/plugins/surround.ts b/src/actions/plugins/surround.ts index 3754086bd..0a7ddf453 100644 --- a/src/actions/plugins/surround.ts +++ b/src/actions/plugins/surround.ts @@ -277,7 +277,12 @@ export class CommandSurroundAddToReplacement extends BaseCommand { let endReplace = replacement; if (startReplace[0] === "<") { - endReplace = startReplace[0] + "/" + startReplace.slice(1); + let tagName = /([-\w]+)/.exec(startReplace); + if (tagName) { + endReplace = ``; + } else { + endReplace = " { end: ["first <123>|line test"], }); + newTest({ + title: "ysiw< surrounds word with tags and attributes", + start: ["first li|ne test"], + keysPressed: 'ysiw', + end: ['first |line test'], + }); + newTest({ title: "change surround", start: ["first 'li|ne' test"],