Method: HTML#img_to_aozora

Defined in:
lib/html.rb

#img_to_aozora(text = @string) ⇒ Object



97
98
99
100
101
102
103
104
105
106
# File 'lib/html.rb', line 97

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