我在这里安装了 W3C tidy-html5 包:~/Library/Application Support/Avian/Pristine Copy/Bundles/tidy-html5
但是,当我在终端中运行该命令时,它似乎无法识别 HTML5 标签。看起来它可能正在运行旧的 HTML Tidy 方法,它只能理解 XHTML/HTML4。
例如,如果我运行:
tidy ~/Desktop/tidy-test.html
Run Code Online (Sandbox Code Playgroud)
我得到这个输出:
line 1 column 180 - Error: <aside> is not recognized!
line 1 column 180 - Warning: discarding unexpected <aside>
line 1 column 353 - Error: <section> is not recognized!
line 1 column 353 - Warning: discarding unexpected <section>
line 1 column 418 - Warning: replacing invalid character code 139
line 1 column 419 - Warning: replacing invalid character code 134
line 1 column …Run Code Online (Sandbox Code Playgroud)