From 4780d30409e53798fe7fe9f80b573fd29fa02e0a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Nicol=C3=A1s=20Reynolds?= <fauno@endefensadelsl.org>
Date: Fri, 16 Aug 2013 15:03:44 -0300
Subject: [PATCH] Issue #3 - Remove trailing dash

---
 pandoc.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pandoc.rb b/pandoc.rb
index 48d388f..3c5eff5 100644
--- a/pandoc.rb
+++ b/pandoc.rb
@@ -24,7 +24,7 @@ class PandocGenerator < Generator
 
         filename = post.url.gsub(/\.html$/, ".#{output}")
         # Have a filename!
-        filename = "#{post.url.gsub(/\//, "-")}.#{output}" if filename =~ /\/$/
+        filename = "#{post.url.gsub(/\//, "-").gsub(/-$/, "")}.#{output}" if filename =~ /\/$/
 
         filename_with_path = File.join(post_path, filename)
 
-- 
GitLab