mirror of
https://github.com/Hopiu/djLint.git
synced 2026-05-17 09:31:07 +00:00
updated regex for H011, closes #37
This commit is contained in:
parent
849648a8d6
commit
c95574b568
2 changed files with 3 additions and 3 deletions
|
|
@ -76,7 +76,7 @@ def lint_file(config: Config, this_file: Path) -> Dict:
|
|||
{
|
||||
"code": rule["name"],
|
||||
"line": get_line(match.start(), line_ends),
|
||||
"match": match.group()[:20].strip(),
|
||||
"match": match.group().strip()[:20],
|
||||
"message": rule["message"],
|
||||
}
|
||||
)
|
||||
|
|
|
|||
|
|
@ -85,9 +85,9 @@
|
|||
- rule:
|
||||
name: H011
|
||||
message: Attribute values should be quoted.
|
||||
flags: re.DOTALL|re.I
|
||||
flags: re.DOTALL|re.I|re.M
|
||||
patterns:
|
||||
- "[^(?:\"|')]\\s+?(?:class|id|src|width|height|alt|style|lang|title|href|action|method)=[a-zA-Z]+"
|
||||
- ^^[^(?:"|')]*?\s+?(?:class|id|src|width|height|alt|style|lang|title|href|action|method)=[a-zA-Z_-]+
|
||||
- rule:
|
||||
name: H012
|
||||
message: There should be no spaces around attribute =.
|
||||
|
|
|
|||
Loading…
Reference in a new issue