diff --git a/src/djlint/settings.py b/src/djlint/settings.py
index 1596197..60070a7 100644
--- a/src/djlint/settings.py
+++ b/src/djlint/settings.py
@@ -184,6 +184,7 @@ class Config:
| aside
| footer
| figure
+ | figcaption
| video
| span
| p
@@ -196,6 +197,8 @@ class Config:
| script
| style
| source
+ | details
+ | summary
)
)
"""
@@ -241,6 +244,7 @@ class Config:
| aside
| footer
| figure
+ | figcaption
| video
| span
| p
@@ -253,6 +257,8 @@ class Config:
| script
| style
| source
+ | details
+ | summary
)
)
"""
diff --git a/tests/test_html.py b/tests/test_html.py
index f441ca5..35aa5bb 100644
--- a/tests/test_html.py
+++ b/tests/test_html.py
@@ -139,6 +139,42 @@ def test_dt_tag(runner: CliRunner, tmp_file: TextIO) -> None:
)
+def test_details_summary_tags(runner: CliRunner, tmp_file: TextIO) -> None:
+ write_to_file(
+ tmp_file.name,
+ b"""summary
body """,
+ )
+ runner.invoke(djlint, [tmp_file.name, "--reformat"])
+ assert (
+ Path(tmp_file.name).read_text()
+ == """
+
+ summary
+
+ body
+
+"""
+ )
+
+
+def test_figure_figcaption_tags(runner: CliRunner, tmp_file: TextIO) -> None:
+ write_to_file(
+ tmp_file.name,
+ b"""
caption""",
+ )
+ runner.invoke(djlint, [tmp_file.name, "--reformat"])
+ assert (
+ Path(tmp_file.name).read_text()
+ == """
+
+
+ caption
+
+
+"""
+ )
+
+
def test_ignored_attributes(runner: CliRunner, tmp_file: TextIO) -> None:
output = reformat(
tmp_file,