英文:
Why are my HTML class attributes collapsed inline into three dots?
问题
我不能看到HTML标签的内容,直到我将鼠标悬停在省略号(三个点)上,我该如何摆脱这个问题?
当我禁用所有扩展时,省略号就会消失。
英文:
I can't see the content of HTML tags until I hover over the ellipsis (three dots), how can I get rid of this?!
The ellipses go away when I disable all extensions.
答案1
得分: 1
这个省略号的情况是内联折叠扩展
答案2
得分: 1
这种属性折叠成三个点的行为是由moalamri.inline-fold
VS Code 扩展引起的。你可以在它的Visual Studio Marketplace页面找到它,以及它的源代码在这里。
以下是它自述文件的摘录:
VS Code Inline Fold扩展模拟了VS Code的折叠体验,适用于内联代码。这在使用像Tailwind CSS这样使用大量实用类的框架时特别有用,这些实用类通常会破坏代码的视觉结构。你可以通过单击它们来展开这些折叠。你还可以配置该扩展以针对标记中的特定属性。
遮罩所使用的字符可以在设置中配置,你可以更新正则表达式以匹配任何你想要的代码模式。
该扩展还使HTML/JSX标签内的属性值折叠起来。这可以使你的代码整洁且易于导航。
还有另一个扩展可以产生类似的效果:stivo.tailwind-fold
。
使用VS Code的扩展二分法特性可以帮助你找出是哪个扩展引起了特定的行为。
英文:
This behaviour of attributes being collapsed into three dots is caused by the moalamri.inline-fold
VS Code extension. You can find its Visual Studio Marketplace page here, and its source code here.
An excerpt from its readme:
> VS Code Inline Fold extension mimics VS Code's folding experience for inline code.
This is especially useful when working with frameworks like Tailwind CSS which use lots of utility classes that often disfigure code visual structure. You can expand the folds by clicking on them. You can also configure the extension to target specific attributes in your markup.
The characters used as a mask can be configured in the settings and you can update the regex expression to match any code pattern you want.
The extension also enables folding of attribute values within HTML/JSX tags. It makes your code tidy and easier to navigate.
There's another extension which can have a similar effect: stivo.tailwind-fold
.
It's useful to use VS Code's extension bisect feature to find out what extension is causing certain behaviours.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论