diff --git a/src/djlint/settings.py b/src/djlint/settings.py index e478e0e..6dac3d5 100644 --- a/src/djlint/settings.py +++ b/src/djlint/settings.py @@ -726,6 +726,9 @@ class Config: | li | script | style + | head + | body + | p """ self.always_self_closing_html_tags: str = r""" diff --git a/tests/test_config/test_custom_tags/html.html b/tests/test_config/test_custom_tags/html.html index 93612a3..09ffe95 100644 --- a/tests/test_config/test_custom_tags/html.html +++ b/tests/test_config/test_custom_tags/html.html @@ -1 +1 @@ -{% example stuff %}
this is a long paragraph
{% endexample %} +{% example stuff %}this is a very very long paragraph that does nothing except be a long paragraph asdfasdfasdfasdfasdf fasdf asdfasdfasdf
{% endexample %} diff --git a/tests/test_config/test_custom_tags/test_config.py b/tests/test_config/test_custom_tags/test_config.py index ff6eb0f..f546ea2 100644 --- a/tests/test_config/test_custom_tags/test_config.py +++ b/tests/test_config/test_custom_tags/test_config.py @@ -2,13 +2,12 @@ run:: - pytest tests/test_config.py --cov=src/djlint --cov-branch \ + pytest tests/test_config/test_custom_tags/test_config.py --cov=src/djlint --cov-branch \ --cov-report xml:coverage.xml --cov-report term-missing for a single test, run:: - pytest tests/test_config.py::test_custom_html --cov=src/djlint \ - --cov-branch --cov-report xml:coverage.xml --cov-report term-missing + pytest tests/test_config/test_custom_tags/test_config.py::test_custom_tags """ # pylint: disable=C0116 @@ -23,12 +22,12 @@ def test_custom_tags(runner: CliRunner) -> None: result = runner.invoke( djlint, ["tests/test_config/test_custom_tags/html.html", "--check"] ) - + print(result.output) assert ( - """-{% example stuff %}this is a long paragraph
{% endexample %} + """-{% example stuff %}this is a very very long paragraph that does nothing except be a long paragraph asdfasdfasdfasdfasdf fasdf asdfasdfasdf
{% endexample %} +{% example stuff %} +-+ this is a long paragraph ++ this is a very very long paragraph that does nothing except be a long paragraph asdfasdfasdfasdfasdf fasdf asdfasdfasdf +
+{% endexample %} """ diff --git a/tests/test_config/test_json/test_config.py b/tests/test_config/test_json/test_config.py index 0aa30a6..7081bde 100644 --- a/tests/test_config/test_json/test_config.py +++ b/tests/test_config/test_json/test_config.py @@ -2,13 +2,10 @@ run:: - pytest tests/test_config_json.py --cov=src/djlint --cov-branch \ + pytest tests/test_config/test_json/test_config.py --cov=src/djlint --cov-branch \ --cov-report xml:coverage.xml --cov-report term-missing -for a single test, run:: - - pytest tests/test_config_json.py::test_custom_html --cov=src/djlint \ - --cov-branch --cov-report xml:coverage.xml --cov-report term-missing + pytest tests/test_config/test_json/test_config.py::test_config """ # pylint: disable=C0116 @@ -26,9 +23,7 @@ def test_config(runner: CliRunner) -> None: assert ( """-{% example stuff %}this is a long paragraph
{% endexample %} +{% example stuff %} -+-+ this is a long paragraph -+
++this is a long paragraph
+{% endexample %} """ in result.output diff --git a/tests/test_config/test_pragmas/test_config.py b/tests/test_config/test_pragmas/test_config.py index 0be0417..7ecc37a 100644 --- a/tests/test_config/test_pragmas/test_config.py +++ b/tests/test_config/test_pragmas/test_config.py @@ -2,13 +2,10 @@ run:: - pytest tests/test_config.py --cov=src/djlint --cov-branch \ + pytest tests/test_config/test_pragmas/test_config.py --cov=src/djlint --cov-branch \ --cov-report xml:coverage.xml --cov-report term-missing -for a single test, run:: - - pytest tests/test_config.py::test_custom_html --cov=src/djlint \ - --cov-branch --cov-report xml:coverage.xml --cov-report term-missing + pytest tests/test_config/test_pragmas/test_config.py::test_require_pragma """ # pylint: disable=C0116 @@ -68,14 +65,11 @@ def test_require_pragma(runner: CliRunner) -> None: assert ( """ {{!-- djlint:on --}} -+-
- -{{firstname}}
{{lastname}}
-+ {{firstname}} -+ -+-+ {{lastname}} -+
""" ++{{firstname}}
++{{lastname}}
""" in result.output ) assert """1 file would be updated.""" in result.output @@ -98,13 +92,9 @@ def test_require_pragma(runner: CliRunner) -> None: - -{{ end }} +-+ {{ .Variable }} -+
++{{ .Variable }}
+{{ range .Items }} -+-+ {{ . }} -+
++{{ . }}
+{{ end }} 1 file would be updated.""" diff --git a/tests/test_django/test_comments.py b/tests/test_django/test_comments.py index bbb8d54..232751b 100644 --- a/tests/test_django/test_comments.py +++ b/tests/test_django/test_comments.py @@ -2,13 +2,10 @@ run:: - pytest tests/test_django.py --cov=src/djlint --cov-branch \ + pytest tests/test_django/test_comments.py --cov=src/djlint --cov-branch \ --cov-report xml:coverage.xml --cov-report term-missing -for a single test, run:: - - pytest tests/test_django.py::test_alpine_js --cov=src/djlint \ - --cov-branch --cov-report xml:coverage.xml --cov-report term-missing + pytest tests/test_django/test_comments.py::test_comment """ # pylint: disable=C0116 @@ -100,8 +97,7 @@ def test_comment(runner: CliRunner, tmp_file: TextIO) -> None: {% endcomment %} - - +