Method: HTML#img_to_aozora

Defined in:
lib/html.rb

#img_to_aozora(text = @string) ⇒ Object



73
74
75
76
77
78
79
80
81
82
# File 'lib/html.rb', line 73

def img_to_aozora(text = @string)
  if @illust_grep_pattern
    text.gsub(@illust_grep_pattern) do
      url = @illust_current_url ? URI.join(@illust_current_url, $~[:src]) : $~[:src]
      "[#挿絵(#{url})入る]"
    end
  else
    text
  end
end