Prettier 通常在 HTML 上做得非常好,但缩进了 pre> 代码块。
我总是希望 pre> 代码块不缩进。
似乎我应该能够在 .prettierignore 中配置它,但找不到有效的方法。
块如:
<pre class="line-numbers"><code class="language-json">"operations": [
"video-cloud/video/all",
"video-cloud/playlist/all",
"video-cloud/sharing-relationships/all",
"video-cloud/notifications/all"
]</code></pre>
像这样缩进:
<pre class="line-numbers"><code class="language-json">"operations": [
"video-cloud/video/all",
"video-cloud/playlist/all",
"video-cloud/sharing-relationships/all",
"video-cloud/notifications/all"
]</code></pre>
我希望该块保持不变。
引用已删除的答案:
我个人不使用该扩展,但似乎 prettier 已经内置了它的配置:https://prettier.io/docs/en/ignore.html https://prettier.io/docs/en/ignore.html
IUIC,解决方案是
<!-- prettier-ignore-start -->
block to keep
<!-- prettier-ignore-end -->
投票取消删除“cas v.l.”的答案因为它让我在几秒钟内找到了解决方案。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)