mirror of
https://github.com/Hopiu/djLint.git
synced 2026-03-17 05:50:24 +00:00
parent
79cd013f8d
commit
ea766722a5
2 changed files with 14 additions and 2 deletions
|
|
@ -18,8 +18,8 @@
|
|||
# close
|
||||
- '[^(\s|^|\-)]+[}|%|#]}'
|
||||
- '[^(\s|^)]+\-[}|%|#]}'
|
||||
- \s{2,}[}|%|#]}
|
||||
- '{[{|%|#]-?\s{2,}'
|
||||
- '[^\s][ ]{2,}[}|%|#]}'
|
||||
- '{[{|%|#]-?[ ]{2,}'
|
||||
- rule:
|
||||
name: T002
|
||||
message: Double quotes should be used in tags.
|
||||
|
|
|
|||
|
|
@ -50,6 +50,18 @@ def test_T001(runner: CliRunner, tmp_file: TextIO) -> None:
|
|||
result = runner.invoke(djlint, [tmp_file.name, "--profile", "jinja"])
|
||||
assert result.exit_code == 0
|
||||
|
||||
# test line break around tag
|
||||
write_to_file(
|
||||
tmp_file.name,
|
||||
b"""<div>
|
||||
{%
|
||||
("SashaNose", "1"),
|
||||
%}
|
||||
</div>""",
|
||||
)
|
||||
result = runner.invoke(djlint, [tmp_file.name, "--profile", "jinja"])
|
||||
assert "T001" not in result.output
|
||||
|
||||
|
||||
def test_T002(runner: CliRunner, tmp_file: TextIO) -> None:
|
||||
write_to_file(tmp_file.name, b"{% extends 'this' %}")
|
||||
|
|
|
|||
Loading…
Reference in a new issue