diff --git a/lib/rdoc/generator/template/aliki/_sidebar_pages.rhtml b/lib/rdoc/generator/template/aliki/_sidebar_pages.rhtml
index 2cb46ed517..94004ae7e1 100644
--- a/lib/rdoc/generator/template/aliki/_sidebar_pages.rhtml
+++ b/lib/rdoc/generator/template/aliki/_sidebar_pages.rhtml
@@ -35,7 +35,7 @@
<%= h f.page_name %>
- <%- next %>
+ <%- next -%>
<%- end %>
diff --git a/lib/rdoc/generator/template/darkfish/_sidebar_pages.rhtml b/lib/rdoc/generator/template/darkfish/_sidebar_pages.rhtml
index d6e0650abc..1d93300124 100644
--- a/lib/rdoc/generator/template/darkfish/_sidebar_pages.rhtml
+++ b/lib/rdoc/generator/template/darkfish/_sidebar_pages.rhtml
@@ -13,7 +13,7 @@
<%- f = files.shift %>
<%- if files.empty? %>
<%= h f.page_name %>
- <%- next %>
+ <%- next -%>
<%- end %>
><%
if n == f.page_name