Skip to content

Commit b48717e

Browse files
author
Aedx
committed
Merge pull request #30 from schnarald/master
Offers tidy5 (tidy-html5) precedence over tidy by default, adds checking for tidy5.
2 parents ede470f + 03e1680 commit b48717e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

linter.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,17 @@
1111
"""This module exports the HtmlTidy plugin class."""
1212

1313
from SublimeLinter.lint import Linter, util
14+
import shutil
1415

1516

1617
class HtmlTidy(Linter):
1718

1819
"""Provides an interface to tidy."""
1920

2021
syntax = 'html'
21-
cmd = 'tidy -errors -quiet -utf8'
22+
if shutil.which('tidy5'):
23+
cmd = 'tidy5 -errors -quiet -utf8'
24+
else:
25+
cmd = 'tidy -errors -quiet -utf8'
2226
regex = r'^line (?P<line>\d+) column (?P<col>\d+) - (?:(?P<error>Error)|(?P<warning>Warning)): (?P<message>.+)'
2327
error_stream = util.STREAM_STDERR

0 commit comments

Comments
 (0)