mirror of
https://github.com/moparisthebest/www.moparscape.org
synced 2024-12-25 08:58:49 -05:00
updated plugins to work with latest version of Liquid
This commit is contained in:
parent
2a55f35211
commit
e53b26ad30
@ -46,7 +46,7 @@ module Jekyll
|
|||||||
end
|
end
|
||||||
|
|
||||||
def render(context)
|
def render(context)
|
||||||
quote = paragraphize(super.map(&:strip).join)
|
quote = paragraphize(super)
|
||||||
author = "<strong>#{@by.strip}</strong>" if @by
|
author = "<strong>#{@by.strip}</strong>" if @by
|
||||||
if @source
|
if @source
|
||||||
url = @source.match(/https?:\/\/(.+)/)[1].split('/')
|
url = @source.match(/https?:\/\/(.+)/)[1].split('/')
|
||||||
@ -75,7 +75,7 @@ module Jekyll
|
|||||||
end
|
end
|
||||||
|
|
||||||
def paragraphize(input)
|
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
|
end
|
||||||
end
|
end
|
||||||
|
@ -79,7 +79,7 @@ module Jekyll
|
|||||||
|
|
||||||
def render(context)
|
def render(context)
|
||||||
output = super
|
output = super
|
||||||
code = super.join
|
code = super
|
||||||
source = "<figure class='code'>"
|
source = "<figure class='code'>"
|
||||||
source += @caption if @caption
|
source += @caption if @caption
|
||||||
if @filetype
|
if @filetype
|
||||||
|
@ -32,11 +32,9 @@ module Jekyll
|
|||||||
|
|
||||||
def render(context)
|
def render(context)
|
||||||
output = super
|
output = super
|
||||||
if output.join =~ /\{"\s*(.+)\s*"\}/
|
if output =~ /\{"\s*(.+?)\s*"\}/m
|
||||||
#@quote = $1
|
|
||||||
@quote = RubyPants.new($1).to_html
|
@quote = RubyPants.new($1).to_html
|
||||||
#@quote = CGI.escape($1)
|
"<span class='pullquote-#{@align}' data-pullquote='#{@quote}'>#{output.gsub(/\{"\s*|\s*"\}/, '')}</span>"
|
||||||
"<span class='pullquote-#{@align}' data-pullquote='#{@quote}'>#{output.join.gsub(/\{"\s*|\s*"\}/, '')}</span>"
|
|
||||||
else
|
else
|
||||||
return "Surround your pullquote like this {\" text to be quoted \"}"
|
return "Surround your pullquote like this {\" text to be quoted \"}"
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user