diff --git a/lib/feed.xml b/lib/feed.xml index f298a88a..864940e8 100644 --- a/lib/feed.xml +++ b/lib/feed.xml @@ -27,13 +27,13 @@ {% for post in site.posts %} - {{ post.title | xml_escape }} + {{ post.title | markdownify | strip_html | strip_newlines | xml_escape }} {{ post.date | date_to_xmlschema }} {{ post.date | date_to_xmlschema }} {{ post.id | prepend: url_base }} - {{ post.content | xml_escape }} + {{ post.content | markdownify | xml_escape }} {% if post.author %} @@ -50,7 +50,7 @@ {% endfor %} {% if post.excerpt %} - {{ post.excerpt | strip_html | strip_newlines | xml_escape }} + {{ post.excerpt | markdownify | strip_html | strip_newlines | xml_escape }} {% endif %} {% endfor %} diff --git a/script/cibuild b/script/cibuild index eb5f86b3..ca12e9ea 100755 --- a/script/cibuild +++ b/script/cibuild @@ -1,4 +1,6 @@ #! /bin/bash +set -e + bundle exec rspec gem build jekyll-feed.gemspec diff --git a/spec/fixtures/_posts/2013-12-12-dec-the-second.md b/spec/fixtures/_posts/2013-12-12-dec-the-second.md index 02829945..89047e25 100644 --- a/spec/fixtures/_posts/2013-12-12-dec-the-second.md +++ b/spec/fixtures/_posts/2013-12-12-dec-the-second.md @@ -1,4 +1,4 @@ --- --- -December the twelfth, actually. +# December the twelfth, actually. diff --git a/spec/jekyll-feed_spec.rb b/spec/jekyll-feed_spec.rb index 065578e9..c00c43b5 100644 --- a/spec/jekyll-feed_spec.rb +++ b/spec/jekyll-feed_spec.rb @@ -53,6 +53,10 @@ expect(contents).to match /Line 1\nLine 2\nLine 3/ end + it "converts markdown posts to HTML" do + expect(contents).to match /<p>March the second!<\/p>/ + end + context "parsing" do let(:feed) { RSS::Parser.parse(contents) }