From 910d37406a9b69f60bff738831ccae88392a1165 Mon Sep 17 00:00:00 2001 From: Matt Kiser <2197111+mkiser@users.noreply.github.com> Date: Thu, 26 Oct 2017 13:27:49 -0700 Subject: [PATCH] strip newlines from twitter embed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Not sure if this is the best way of handling it, but it worked for me. Background on this is that Jekyll was choking on the newline when a tweet was included as part of a list item, causing the list to close early and leaving a dangling `` The Twitter embed comes back with `\n` between the blockquote and the script. For whatever reason Jekyll hated this. ¯\_(ツ)_/¯ --- lib/jekyll-twitter-plugin.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/jekyll-twitter-plugin.rb b/lib/jekyll-twitter-plugin.rb index 713bb8b..706415d 100644 --- a/lib/jekyll-twitter-plugin.rb +++ b/lib/jekyll-twitter-plugin.rb @@ -179,6 +179,7 @@ def api_client # @api private def html_output_for(response) body = (response.html if response) || ERROR_BODY_TEXT + body = body.delete!("\n") "