11
11
"""This module exports the Htmlhint plugin class."""
12
12
13
13
import re
14
- from SublimeLinter .lint import Linter , util , persist
14
+ from SublimeLinter .lint import Linter , persist
15
15
16
16
17
17
class Htmlhint (Linter ):
@@ -20,7 +20,7 @@ class Htmlhint(Linter):
20
20
21
21
syntax = 'html'
22
22
cmd = 'htmlhint'
23
- executable = None
23
+ # executable = 'htmlhint'
24
24
version_args = '--version'
25
25
version_re = r'(?P<version>\d+\.\d+\.\d+)'
26
26
version_requirement = '>= 0.9.0'
@@ -44,14 +44,13 @@ class Htmlhint(Linter):
44
44
warn_re = re .compile (warn_regex )
45
45
46
46
def split_match (self , match ):
47
- split = super ().split_match (match )
47
+ match , line , col , error , warning , message , near = super ().split_match (match )
48
48
if match :
49
- message = match .group ('message' )
50
-
51
49
# check if message is a warning
52
50
warn = self .warn_re .match (message )
53
51
if warn :
54
- split = (split [0 ], split [1 ], split [2 ], False , True , split [5 ], split [6 ])
52
+ return match , line , col , False , True , message , near
53
+
54
+ persist .debug ('match -- msg:"{}", match:{}, line:{}, col:{}, near:{}, warn: {}' .format (message , match , line , col , near , warn ))
55
55
56
- persist .debug ('match -- msg:"{}", split:"{}", warn: {}' .format (message , split , warn ))
57
- return split
56
+ return match , line , col , error , warning , message , near
0 commit comments