updated pullquote plugin to work better with latest Liquid version

This commit is contained in:
Brandon Mathis 2012-05-22 16:30:27 -05:00
parent 8e41dd777b
commit ba8edf37a7

View File

@ -32,11 +32,11 @@ module Jekyll
def render(context)
output = super
if output.join =~ /\{"\s*(.+?)\s*"\}/m
if output =~ /\{"\s*(.+?)\s*"\}/m
#@quote = $1
@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