lib/count_days.rb in jekyll-lab-notebook-plugins-0.1.2 vs lib/count_days.rb in jekyll-lab-notebook-plugins-0.1.3

- old
+ new

@@ -15,10 +15,10 @@ result = "{\n" postlist.each do |post| doc = Nokogiri::HTML::DocumentFragment.parse(post.content) doc.search('h3').each do |header| - if dt = DateTime.parse(header.text.strip) rescue false + if dt = DateTime.parse(header.attribute("id")) rescue false result += (dt + Rational(12, 24)).strftime('%s') + ": 4,\n" end end end result += "}"