Repository: rtts/djhtml (language: python)

Issue:
HTML "img" tag causes indenting.
The `<img ...>` tag is not properly seen as a no-indent-causing tag.


Discussion / hints:

Fix patch:
diff --git a/djhtml/modes.py b/djhtml/modes.py
index 20368e0..0530c35 100644
--- a/djhtml/modes.py
+++ b/djhtml/modes.py
@@ -113,6 +113,7 @@ class HTML(Mode):
     IGNORE_TAGS = [
         "br",
         "hr",
+        "img",
         "link",
         "meta",
     ]


Test patch:
diff --git a/tests/suite/html_with_img.in b/tests/suite/html_with_img.in
new file mode 100644
index 0000000..29bac93
--- /dev/null
+++ b/tests/suite/html_with_img.in
@@ -0,0 +1,11 @@
+<html>
+<head>
+<title>Plain</title>
+<script src="test.js"></script>
+<link rel="stylesheet" href="test.css">
+</head>
+<body>
+<h1>Title</h1>
+<img src="test.png">
+</body>
+</html>
diff --git a/tests/suite/html_with_img.out b/tests/suite/html_with_img.out
new file mode 100644
index 0000000..1a0a7a3
--- /dev/null
+++ b/tests/suite/html_with_img.out
@@ -0,0 +1,11 @@
+<html>
+    <head>
+        <title>Plain</title>
+        <script src="test.js"></script>
+        <link rel="stylesheet" href="test.css">
+    </head>
+    <body>
+        <h1>Title</h1>
+        <img src="test.png">
+    </body>
+</html>