diff options
-rw-r--r-- | plugins/blockquote.rb | 4 | ||||
-rw-r--r-- | plugins/code_block.rb | 2 | ||||
-rw-r--r-- | plugins/pullquote.rb | 6 |
3 files changed, 5 insertions, 7 deletions
diff --git a/plugins/blockquote.rb b/plugins/blockquote.rb index 7fb8c261..62e7d143 100644 --- a/plugins/blockquote.rb +++ b/plugins/blockquote.rb @@ -46,7 +46,7 @@ module Jekyll end def render(context) - quote = paragraphize(super.map(&:strip).join) + quote = paragraphize(super) author = "<strong>#{@by.strip}</strong>" if @by if @source url = @source.match(/https?:\/\/(.+)/)[1].split('/') @@ -75,7 +75,7 @@ module Jekyll end def paragraphize(input) - "<p>#{input.gsub(/\n\n/, '</p><p>').gsub(/\n/, '<br/>')}</p>" + "<p>#{input.lstrip.rstrip.gsub(/\n\n/, '</p><p>').gsub(/\n/, '<br/>')}</p>" end end end diff --git a/plugins/code_block.rb b/plugins/code_block.rb index e175d445..44e34945 100644 --- a/plugins/code_block.rb +++ b/plugins/code_block.rb @@ -79,7 +79,7 @@ module Jekyll def render(context) output = super - code = super.join + code = super source = "<figure class='code'>" source += @caption if @caption if @filetype diff --git a/plugins/pullquote.rb b/plugins/pullquote.rb index 2b59bad6..3c65e66e 100644 --- a/plugins/pullquote.rb +++ b/plugins/pullquote.rb @@ -32,11 +32,9 @@ module Jekyll def render(context) output = super - if output.join =~ /\{"\s*(.+)\s*"\}/ - #@quote = $1 + if output =~ /\{"\s*(.+?)\s*"\}/m @quote = RubyPants.new($1).to_html - #@quote = CGI.escape($1) - "<span class='pullquote-#{@align}' data-pullquote='#{@quote}'>#{output.join.gsub(/\{"\s*|\s*"\}/, '')}</span>" + "<span class='pullquote-#{@align}' data-pullquote='#{@quote}'>#{output.gsub(/\{"\s*|\s*"\}/, '')}</span>" else return "Surround your pullquote like this {\" text to be quoted \"}" end |