Merge branch '2.1' into site-2.1

This commit is contained in:
Brandon Mathis 2012-05-22 16:33:33 -05:00
commit c3ba61f5c8
2 changed files with 10 additions and 4 deletions

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

View File

@ -23,8 +23,14 @@ module Jekyll
end
def render(context)
puts ">>> {% puts %} <<<"
puts super.map(&:strip).join
# Use a block if label + output is wider than 80 characters
if super.length > 69
puts "{% puts %}"
puts super
puts "{% endputs %}"
else
puts "{% puts %} #{super}"
end
end
end
end