From 5061f60b3f096f6f83a1ba27a5b2606430ae1453 Mon Sep 17 00:00:00 2001 From: Marin Ivanov Date: Fri, 5 Apr 2013 18:10:02 +0300 Subject: Fixed method to check for title in post/page data --- wikilinks.rb | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'wikilinks.rb') diff --git a/wikilinks.rb b/wikilinks.rb index 7b13c61..e8f9cad 100644 --- a/wikilinks.rb +++ b/wikilinks.rb @@ -17,8 +17,8 @@ module Jekyll def title if @title.nil? - if not @match.nil? && @match.data.has?('title') - @match.data['title'] + if not @match.nil? + match_title else @name end @@ -26,6 +26,12 @@ module Jekyll @title end end + + def match_title + if not @match.data.nil? and @match.data.include? 'title' + @match.data['title'] + end + end def url @match.url -- cgit v1.2.3