From 8db6e65022a7644823687bbec46c3199cb4b8e91 Mon Sep 17 00:00:00 2001 From: Matthias Kestenholz Date: Tue, 21 Sep 2021 10:27:53 +0200 Subject: [PATCH] Commit a failing test: HTML tags inside Django oneline comments are not ignored --- tests/test_django.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/test_django.py b/tests/test_django.py index ed637a0..32f60c7 100644 --- a/tests/test_django.py +++ b/tests/test_django.py @@ -29,6 +29,17 @@ def test_dj_comments_tag(runner: CliRunner, tmp_file: TextIO) -> None: assert output["exit_code"] == 0 +def test_dj_comments_tag_with_html(runner: CliRunner, tmp_file: TextIO) -> None: + output = reformat( + tmp_file, runner, b"{#
#}\n{% if this %}
{% endif %}" + ) + assert ( + output["text"] == """{#
#}\n{% if this %}
{% endif %}\n""" + ) + # no change was required + assert output["exit_code"] == 0 + + def test_reformat_asset_tag(runner: CliRunner, tmp_file: TextIO) -> None: # pylint: disable=C0301 output = reformat(