diff --git a/pytest_mpl/summary/html.py b/pytest_mpl/summary/html.py
index 0f30566d..af87e39a 100644
--- a/pytest_mpl/summary/html.py
+++ b/pytest_mpl/summary/html.py
@@ -93,8 +93,9 @@ def __init__(self, name, item, id):
# Name of test with module and test function together and separate
self.full_name = name
- self.name = name.split('.')[-1]
- self.module = '.'.join(name.split('.')[:-1])
+ without_parametrized_name = name.split("[")[0]
+ self.module = ".".join(without_parametrized_name.split(".")[:-1])
+ self.name = name[len(self.module)+1:]
# Additional classes to add to the result card
self.classes = [f'{k}-{str(v).lower()}' for k, v in [
diff --git a/pytest_mpl/summary/templates/basic.html b/pytest_mpl/summary/templates/basic.html
index 27e6417c..1dfe55ef 100644
--- a/pytest_mpl/summary/templates/basic.html
+++ b/pytest_mpl/summary/templates/basic.html
@@ -73,7 +73,7 @@
Image test comparison
{%- endif %}
{% macro image(file) -%}
- {% if file %} {% endif %} |
+ {% if file %} {% endif %} |
{%- endmacro -%}
{{ image(result.baseline_image) }}
{{ image(result.diff_image) }}
diff --git a/pytest_mpl/summary/templates/result.html b/pytest_mpl/summary/templates/result.html
index 6e7986bd..6c5dd9e3 100644
--- a/pytest_mpl/summary/templates/result.html
+++ b/pytest_mpl/summary/templates/result.html
@@ -12,19 +12,19 @@
{% if r.diff_image -%}
-

+
-

+
{%- else -%}
-

+

{%- endif %}
{%- elif r.result_image -%}
-
+
{%- elif r.baseline_image -%}
-
+
{%- endif %}
{% filter indent(width=8) -%}
diff --git a/pytest_mpl/summary/templates/result_images.html b/pytest_mpl/summary/templates/result_images.html
index 36ab2943..37d4590b 100644
--- a/pytest_mpl/summary/templates/result_images.html
+++ b/pytest_mpl/summary/templates/result_images.html
@@ -13,7 +13,7 @@ {{ r.name }}
{% if file -%}
-

+

{%- endif %}