From 9636f53d823f417686548c4af4ac48120aa3da27 Mon Sep 17 00:00:00 2001 From: "Patrick M. Niedzielski" <patrick@pniedzielski.net> Date: Fri, 27 Jan 2017 21:07:31 +0000 Subject: [PATCH] Generate Pandoc file with correct slug This patch fixes a bug where the slug of a generated pandoc file will be `nil` if the title argument passed to the constructor is `nil`. Instead, the slug should be based on the title chosen earlier in the constructor. --- lib/jekyll-pandoc-multiple-formats/pandoc_file.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/jekyll-pandoc-multiple-formats/pandoc_file.rb b/lib/jekyll-pandoc-multiple-formats/pandoc_file.rb index 894af9f..4828fd6 100644 --- a/lib/jekyll-pandoc-multiple-formats/pandoc_file.rb +++ b/lib/jekyll-pandoc-multiple-formats/pandoc_file.rb @@ -46,7 +46,7 @@ module Jekyll @title = title or posts.data['title'] end - @slug = Utils.slugify(title) + @slug = Utils.slugify(@title) end def path -- GitLab