diff --git a/CHANGELOG.md b/CHANGELOG.md
index 59754cd..e313557 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -15,6 +15,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
 
 - Fix combining assets from multiple scenes to avoid filename collision.
   [#429](https://github.com/jeertmans/manim-slides/pull/429)
+- Fixed whitespace issue in default RevealJS template.
+  [#442](https://github.com/jeertmans/manim-slides/pull/442)
 
 (v5.1.7)=
 ## [v5.1.7](https://github.com/jeertmans/manim-slides/compare/v5.1.6...v5.1.7)
diff --git a/docs/source/_static/template.html b/docs/source/_static/template.html
index c32e335..a3008d2 100644
--- a/docs/source/_static/template.html
+++ b/docs/source/_static/template.html
@@ -32,7 +32,7 @@
               data-background-video="{{ file }}"
               {% if loop.index == 1 and outer_loop.index == 1 -%}
                 data-background-video-muted
-              {%- endif -%}
+              {%- endif %}
               {% if slide_config.loop -%}
                 data-background-video-loop
               {%- endif -%}
diff --git a/manim_slides/templates/revealjs.html b/manim_slides/templates/revealjs.html
index ee4256e..d59b56d 100644
--- a/manim_slides/templates/revealjs.html
+++ b/manim_slides/templates/revealjs.html
@@ -33,7 +33,7 @@
               data-background-video="{{ file }}"
               {% if loop.index == 1 and outer_loop.index == 1 -%}
                 data-background-video-muted
-              {%- endif -%}
+              {%- endif %}
               {% if slide_config.loop -%}
                 data-background-video-loop
               {%- endif -%}