mirror of
https://github.com/Hopiu/djLint.git
synced 2026-05-17 09:31:07 +00:00
Merge pull request #199 from andersk/codespell
Fix spelling mistakes found by codespell
This commit is contained in:
commit
0bd763153a
9 changed files with 9 additions and 9 deletions
2
.github/workflows/cancel.yml
vendored
2
.github/workflows/cancel.yml
vendored
|
|
@ -1,5 +1,5 @@
|
|||
# This action finds in-progress Action jobs for the same branch, and cancels
|
||||
# them. There's little point in continuing to run superceded jobs.
|
||||
# them. There's little point in continuing to run superseded jobs.
|
||||
|
||||
name: cancel
|
||||
|
||||
|
|
|
|||
|
|
@ -129,7 +129,7 @@ date: Last Modified
|
|||
<figure class="image animated mx-auto is-framed" style="max-width:800px" data-animate="headShake">
|
||||
<video autoplay loop muted playsinline>
|
||||
<source src="/static/img/demo.webm" type="video/webm">
|
||||
<img src="/static/img/demo.gif" alt="djlint html template formater demo" loading="lazy" decoding="async">
|
||||
<img src="/static/img/demo.gif" alt="djlint html template formatter demo" loading="lazy" decoding="async">
|
||||
</video>
|
||||
</figure>
|
||||
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ A good rule follows this pattern:
|
|||
| H023 | Do not use entity references. |
|
||||
| H024 | Omit type on scripts and styles. |
|
||||
| H025 | Tag seems to be an orphan. |
|
||||
| H026 | Emtpy id and class tags can be removed. |
|
||||
| H026 | Empty id and class tags can be removed. |
|
||||
| T027 | Unclosed string found in template syntax. |
|
||||
| T028 | Consider using spaceless tags inside attribute values. {% raw %}`{%- if/for -%}`{% endraw %} |
|
||||
| H029 | Consider using lowercase form method values. |
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ Une bonne règle suit ce modèle :
|
|||
| H023 | N'utilisez pas de références d'entités. |
|
||||
| H024 | Omettre le type sur les scripts et les styles. |
|
||||
| H025 | La balise semble être orpheline. |
|
||||
| H026 | Les balises Emtpy id et class peuvent être supprimées. |
|
||||
| H026 | Les balises id et class vides peuvent être supprimées. |
|
||||
| T027 | Chaîne non fermée trouvée dans la syntaxe du modèle. |
|
||||
| T028 | Envisagez d'utiliser des balises sans espace à l'intérieur des valeurs d'attributs. {% raw %}`{%- if/for -%}`{% endraw %} |
|
||||
| H029 | Pensez à utiliser des valeurs de méthode de formulaire en minuscules. |
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ djlint /path/to/this.html.j2 --profile=jinja
|
|||
| H023 | Не используйте ссылки на сущности. |
|
||||
| H024 | Опускайте тип в скриптах и стилях. |
|
||||
| H025 | Тег кажется бесхозным. |
|
||||
| H026 | Теги Emtpy id и class могут быть удалены. |
|
||||
| H026 | Пустые теги id и class могут быть удалены. |
|
||||
| T027 | В синтаксисе шаблона найдена незакрытая строка. |
|
||||
| T028 | Рассмотрите возможность использования тегов без пробелов внутри значений атрибутов. {% raw %}`{%- if/for -%}`{% endraw %} |
|
||||
| H029 | Рассмотрите возможность использования строчных значений метода формы. |
|
||||
|
|
|
|||
|
|
@ -244,7 +244,7 @@ def format_style(match: re.match) -> str:
|
|||
|
||||
def format_attributes(config: Config, html: str, match: re.match) -> str:
|
||||
"""Spread long attributes over multiple lines."""
|
||||
# check that we are not inside an ingnored block
|
||||
# check that we are not inside an ignored block
|
||||
if (
|
||||
inside_ignored_block(config, html, match)
|
||||
or len(match.group(3).strip()) < config.max_attribute_length
|
||||
|
|
|
|||
|
|
@ -187,7 +187,7 @@
|
|||
- <((/?(\w+))\b(\"[^\"]*\"|'[^']*'|{{[^}]*}}|{%[^%]*%}|[^'\">{}])*)(?<!/)>
|
||||
- rule:
|
||||
name: H026
|
||||
message: Emtpy id and class tags can be removed.
|
||||
message: Empty id and class tags can be removed.
|
||||
flags: re.I
|
||||
patterns:
|
||||
- <\w+\b[^(?:{(?:%|{|#))>]*?\b(class|id)\b=(\"\"|'')
|
||||
|
|
|
|||
|
|
@ -349,7 +349,7 @@ class Config:
|
|||
"""
|
||||
|
||||
# ignored block closing tags that
|
||||
# we can savely indent.
|
||||
# we can safely indent.
|
||||
self.safe_closing_tag: str = r"""
|
||||
</script
|
||||
| </style
|
||||
|
|
|
|||
|
|
@ -481,7 +481,7 @@ def test_H025(runner: CliRunner, tmp_file: TextIO) -> None:
|
|||
assert "H025 1:" in result.output
|
||||
assert "H025 2:" not in result.output
|
||||
|
||||
# test tags inside attibutes
|
||||
# test tags inside attributes
|
||||
write_to_file(tmp_file.name, b'<span title="<p>Bar</p>">Foo</span>')
|
||||
result = runner.invoke(djlint, [tmp_file.name])
|
||||
assert "H025" not in result.output
|
||||
|
|
|
|||
Loading…
Reference in a new issue