mirror of
https://github.com/Hopiu/djLint.git
synced 2026-05-19 18:31:54 +00:00
added rule H020. closes #64
This commit is contained in:
parent
a657424ed6
commit
b7e456a947
3 changed files with 12 additions and 0 deletions
|
|
@ -1,6 +1,10 @@
|
|||
Changelog
|
||||
=========
|
||||
|
||||
Next Release
|
||||
------------
|
||||
- Added rule H020 to find empty tag pairs
|
||||
|
||||
0.5.3
|
||||
-----
|
||||
- Change stdout for ``--reformat/check`` options to only print new html when using stdin as the input
|
||||
|
|
|
|||
|
|
@ -49,6 +49,8 @@ Codes
|
|||
+--------+-------------------------------------------------------------------------+
|
||||
| H019 | Replace 'javascript:abc()' with on_ event and real url. |
|
||||
+--------+-------------------------------------------------------------------------+
|
||||
| H020 | Empty tag pair found. Consider removing. |
|
||||
+--------+-------------------------------------------------------------------------+
|
||||
|
||||
Adding Rules
|
||||
------------
|
||||
|
|
|
|||
|
|
@ -269,3 +269,9 @@
|
|||
patterns:
|
||||
- <(?:a|div|span|input)\s+?[^>]*?(?:href|data-url)=[\"|']javascript:[\w|/]+
|
||||
- <form\s+?[^>]*?(?:action)=[\"|']javascript:[\w|/]+
|
||||
- rule:
|
||||
name: H020
|
||||
message: Empty tag pair found. Consider removing.
|
||||
flags: re.DOTALL|re.I
|
||||
patterns:
|
||||
- <(\w+)\s*?>\s*?<\/\1>
|
||||
|
|
|
|||
Loading…
Reference in a new issue