mirror of
https://github.com/Hopiu/djLint.git
synced 2026-03-20 23:30:24 +00:00
parent
ca7ff3a1c7
commit
6f84539038
2 changed files with 3 additions and 9 deletions
|
|
@ -210,15 +210,9 @@
|
|||
- "{{((?:(?!\"|}}).)*?(\")(?:(?!\\2|}}).)*?\\2(?:(?!\\2|}}).)*?)*\\2(?:(?!\\2|}}).)*?}}"
|
||||
|
||||
# for tags with a single quote
|
||||
# for double quotes
|
||||
- "{%((?:(?!\"|%}).)*?(\")(?:(?!\\2|%}).)*?)%}"
|
||||
# for single quotes
|
||||
- "{%((?:(?!'|%}).)*?(')(?:(?!\\2|%}).)*?)%}"
|
||||
- "{%((?:(?!'|\"|%}).)*?('|\")(?:(?!\\2|%}).)*?)%}"
|
||||
- "{{((?:(?!'|\"|}}).)*?('|\")(?:(?!\\2|}}).)*?)}}"
|
||||
|
||||
# for double quotes
|
||||
- "{{((?:(?!\"|}}).)*?(\")(?:(?!\\2|}}).)*?)}}"
|
||||
# for single quotes
|
||||
- "{{((?:(?!'|}}).)*?(')(?:(?!\\2|}}).)*?)}}"
|
||||
- rule:
|
||||
name: T028
|
||||
message: Consider using spaceless tags inside attribute values. {%- if/for -%}
|
||||
|
|
|
|||
|
|
@ -590,7 +590,7 @@ def test_T027(runner: CliRunner, tmp_file: TextIO) -> None:
|
|||
tmp_file.name,
|
||||
b'{% trans "Check box if you\'re interested in this location." %}',
|
||||
)
|
||||
result = runner.invoke(djlint, [tmp_file.name])
|
||||
result = runner.invoke(djlint, [tmp_file.name, "--profile", "django"])
|
||||
assert "T027" not in result.output
|
||||
|
||||
# test mixed quotes
|
||||
|
|
|
|||
Loading…
Reference in a new issue