Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/visual-studio-code/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/google-maps/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
VS代码中的Emmet未正确转换HTML链接_Html_Visual Studio Code_Emmet - Fatal编程技术网

VS代码中的Emmet未正确转换HTML链接

VS代码中的Emmet未正确转换HTML链接,html,visual-studio-code,emmet,Html,Visual Studio Code,Emmet,当我在HTML文件中选择一个纯文本链接并通过键入“a”在VS代码中使用Emmet对其进行转换时,预览如下所示: <a href="https://www.google.com">https://www.google.com</a> 但是,当我单击Enter时,href属性中的链接消失,变成: <a href="">https://www.google.com</a> 我怎样才能防止这种情况发生?提

当我在HTML文件中选择一个纯文本链接并通过键入“a”在VS代码中使用Emmet对其进行转换时,预览如下所示:

<a href="https://www.google.com">https://www.google.com</a>

但是,当我单击Enter时,href属性中的链接消失,变成:

<a href="">https://www.google.com</a>


我怎样才能防止这种情况发生?提前感谢。

使用Emmet,您可以打印
a:link
或只打印
a:link[href=”https://www.google.com"]{https://www.google.com}
,但是请访问

您使用哪个emmet命令?我使用的是
Emmet:Wrap缩写
,当我按EnterAh键时,没有什么奇怪的事情发生。我用“Wrap individual lines with缩写”试过了,但“Wrap with缩写”不起作用。我总是使用
lines
版本,我看不出有必要使用单行,如果选择的不是URL,则
版本的行为与您描述的相同