配置 HTML Tidy 以缩进标签,而在记事本中不做任何其他事情++
我希望 HTMLTidy 做的就是缩进 HTML 文档的标签,但它目前还更改 doctype
,向 html
标签添加 xmlns
属性,更改
标签,并且可能会执行其他一些操作。
如何使 Notepad++ 中的 HTMLTidy 仅在选择 TextFX → TextFX HTML Tidy → TiDy Clean Document-nowrap 时执行缩进?
All I want HTMLTidy to do is indent my HTML document's tags, but it currently also changes the doctype
, adds an xmlns
attribute to the html
tag, changes <br />
tags, and probably does some other stuff.
How do I make it so that HTMLTidy in Notepad++ only performs indentation when I select TextFX → TextFX HTML Tidy → TiDy Clean Document-nowrap?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
plugins\Config\tidy
中有一个名为HTMLTIDY.CFG
的文件,用于配置 Tidy 操作。 从你所说的来看,我认为你所要做的就是删除(或用“;”注释掉)除缩进选项之外的所有内容,即There's a file called
HTMLTIDY.CFG
in<NPPInstallDir>plugins\Config\tidy
that configures the Tidy operation. From what you said, I think all you'd have to do is remove (or comment out with ';') everything but the indent options, i.e.是的,使用 Notepad++ 的 XML 插件。 它有一个“漂亮的打印”功能,可能适用于 HTML。
Yes, use the XML plugin for Notepad++. It has a "pretty print" feature that will probably work on HTML.