我想用vim编辑一个启用了html tidy的ionic应用程序,但是我遇到了许多错误。
我该如何让html tidy识别ionic标记,或者忽略它们,以免出现以下错误:
www/index.html|26 col 5 error| <ion-pane> is not recognized!
...
www/index.html|24 col 3 warning| <body> proprietary attribute "ng-app"
我想用vim编辑一个启用了html tidy的ionic应用程序,但是我遇到了许多错误。
我该如何让html tidy识别ionic标记,或者忽略它们,以免出现以下错误:
www/index.html|26 col 5 error| <ion-pane> is not recognized!
...
www/index.html|24 col 3 warning| <body> proprietary attribute "ng-app"
对我来说,解决方案是设置以下内容:
let g:syntastic_html_tidy_ignore_errors=["<ion-", "discarding unexpected </ion-", " proprietary attribute \"ng-"]
ion-pane
等添加到 g:syntastic_html_tidy_blocklevel_tags
中,只忽略关于属性的错误。您还可以尝试使用 HTML Tidy for HTML5 替代 tidy
(参见 syntastic 的 wiki)。 - lcd047