I am using nxhtml-mode to edit html files. Recently, I start to use HTML5 markups such as <article>
and <section>
. Flymake throws errors for those tags. Now, I am using tidy for html validation. The setting is like below:
(defun flymake-html-init ()
(let* ((temp-file (flymake-init-create-temp-buffer-copy
'flymake-create-temp-inplace))
(local-file (file-relative-name
temp-file
(file-name-directory buffer-file-name))))
(list "tidy" (list local-file))))
(add-to-list 'flymake-allowed-file-name-masks
'("\\.html$\\|\\.ctp" flymake-html-init))
(add-to-list 'flymake-err-line-patterns
'("line \\([0-9]+\\) column \\([0-9]+\\) - \\(Warning\\|Error\\): \\(.*\\)"
nil 1 2 4))
Is there any alternatives to tidy which supports html5? Thank you.