From 3e0b13edcb36cdebb02d8932a9719225f82a8047 Mon Sep 17 00:00:00 2001 From: Christopher Pickering Date: Mon, 31 Jan 2022 16:16:17 -0600 Subject: [PATCH] fixed #177, added test --- docs/src/docs/changelog.md | 6 ++++++ pyproject.toml | 2 +- src/djlint/settings.py | 2 +- .../test_config_format_attribute_template_tags.py | 4 +--- tests/test_html.py | 14 +++++++++++++- 5 files changed, 22 insertions(+), 6 deletions(-) diff --git a/docs/src/docs/changelog.md b/docs/src/docs/changelog.md index 3870a9b..e066a59 100644 --- a/docs/src/docs/changelog.md +++ b/docs/src/docs/changelog.md @@ -8,6 +8,12 @@ keywords: template linter, template formatter, djLint, HTML, templates, formatte # Changelog +## 0.7.4 + +::: content +- Bug fixes [#177](https://github.com/Riverside-Healthcare/djLint/issues/177) + ::: + ## 0.7.3 ::: content diff --git a/pyproject.toml b/pyproject.toml index 1880a6f..f1150ff 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,7 +7,7 @@ build-backend = "poetry.core.masonry.api" [tool.poetry] name="djlint" -version="0.7.3" +version="0.7.4" description="HTML Template Linter and Formatter" license="GPL-3.0-or-later" authors=["Christopher Pickering "] diff --git a/src/djlint/settings.py b/src/djlint/settings.py index 72eacfb..9ad79c8 100644 --- a/src/djlint/settings.py +++ b/src/djlint/settings.py @@ -754,7 +754,7 @@ class Config: | head | body | div - | a + # | a # a gets no breaks #177 | nav | ul | ol diff --git a/tests/test_config_format_attribute_template_tags.py b/tests/test_config_format_attribute_template_tags.py index aaf99c4..cfa9599 100644 --- a/tests/test_config_format_attribute_template_tags.py +++ b/tests/test_config_format_attribute_template_tags.py @@ -76,9 +76,7 @@ def test_without_config(runner: CliRunner, tmp_file: TextIO) -> None: == r""" - - + object-id="{{ report.report_id }}"> """ ) output = reformat( diff --git a/tests/test_html.py b/tests/test_html.py index d83b279..8c97905 100644 --- a/tests/test_html.py +++ b/tests/test_html.py @@ -5,7 +5,7 @@ run:: pytest tests/test_html.py --cov=src/djlint --cov-branch \ --cov-report xml:coverage.xml --cov-report term-missing - pytest tests/test_html.py::test_script_tag --cov=src/djlint --cov-branch \ + pytest tests/test_html.py::test_a_tag --cov=src/djlint --cov-branch \ --cov-report xml:coverage.xml --cov-report term-missing @@ -71,6 +71,18 @@ asdf ) +def test_a_tag(runner: CliRunner, tmp_file: TextIO) -> None: + output = reformat( + tmp_file, + runner, + b"""

+ some nice text asdf, ok +

""", + ) + + assert output.exit_code == 0 + + def test_script_tag(runner: CliRunner, tmp_file: TextIO) -> None: write_to_file( tmp_file.name,