mirror of
https://github.com/Hopiu/djLint.git
synced 2026-05-02 02:44:43 +00:00
fixed settings, added docs note
This commit is contained in:
parent
97967dc622
commit
c7d73bed09
3 changed files with 7 additions and 5 deletions
|
|
@ -50,15 +50,15 @@ Usage:
|
|||
custom_blocks = "toc,example"
|
||||
|
||||
custom_html
|
||||
-------------
|
||||
-----------
|
||||
|
||||
Use to indent custom HTML tags. For example ``<mjml>`` or ``<simple-greeting>``
|
||||
Use to indent custom HTML tags. For example ``<mjml>`` or ``<simple-greeting>`` or ``<mj-\w+>``
|
||||
|
||||
Usage:
|
||||
|
||||
.. code:: ini
|
||||
|
||||
custom_html = "mjml,simple-greeting"
|
||||
custom_html = "mjml,simple-greeting,mj-\\w+"
|
||||
|
||||
indent
|
||||
------
|
||||
|
|
|
|||
|
|
@ -777,6 +777,7 @@ class Config:
|
|||
| summary
|
||||
| """
|
||||
+ self.always_self_closing_html_tags
|
||||
+ self.custom_html
|
||||
+ """
|
||||
"""
|
||||
)
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ run::
|
|||
|
||||
for a single test, run::
|
||||
|
||||
pytest tests/test_config.py::test_indent --cov=src/djlint \
|
||||
pytest tests/test_config.py::test_custom_html --cov=src/djlint \
|
||||
--cov-branch --cov-report xml:coverage.xml --cov-report term-missing
|
||||
|
||||
"""
|
||||
|
|
@ -33,9 +33,10 @@ 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"])
|
||||
|
||||
print(result.output)
|
||||
assert (
|
||||
"""-<mjml><mj-body>this is a email text</mj-body></mjml>
|
||||
+<mjml>
|
||||
|
|
|
|||
Loading…
Reference in a new issue