diff --git a/docs/docs/configuration.rst b/docs/docs/configuration.rst index 6883989..dce076b 100644 --- a/docs/docs/configuration.rst +++ b/docs/docs/configuration.rst @@ -49,6 +49,17 @@ Usage: custom_blocks = "toc,example" +custom_html +------------- + +Use to indent custom HTML tags. For example ```` or ```` + +Usage: + +.. code:: ini + + custom_html = "mjml,simple-greeting" + indent ------ diff --git a/tests/config_custom_html/html.html b/tests/config_custom_html/html.html new file mode 100644 index 0000000..a5a1acc --- /dev/null +++ b/tests/config_custom_html/html.html @@ -0,0 +1 @@ +this is a email text diff --git a/tests/test_config.py b/tests/test_config.py index c9e03aa..d20c430 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -33,6 +33,21 @@ def test_custom_tags(runner: CliRunner) -> None: ) assert result.exit_code == 1 +def test_custom_html(runner: CliRunner) -> None: + result = runner.invoke(djlint, ["tests/config_custom_html/html.html", "--check"]) + + assert ( + """-this is a email text ++ ++ ++ this is a email text ++ ++ +""" + in result.output + ) + assert result.exit_code == 1 + def test_extension(runner: CliRunner) -> None: result = runner.invoke(djlint, ["tests/config_extension", "--check"])