Permalink
Browse files

update aozorabunko_html2xhtml.rb

  • Loading branch information...
1 parent 20a5f0e commit b62d65d5ee45e32b80a775419bd21804cbce264e crepusculum committed Dec 6, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 aozorabunko_html2xhtml.rb
View
3 aozorabunko_html2xhtml.rb 100644 → 100755
@@ -25,7 +25,8 @@ def eliminate(contents)
if switch_body == 'on' then
line.gsub!(/<a\s+href.+?>(.+?)<\/a>/, '\1')
line.gsub!(/<script\s+.+?<\/script>/, '')
- line.gsub!(/(<img.+?src=\").+\/(.+?\")(.+?\s*\/>)/, 'img src="../images/\2\3')
+ #line.gsub!(/(<img.+?src=\").+\/(.+?\")(.+?\s*\/>)/, 'img src="../images/\2\3')
+ line.gsub!(/<img.+?src=\"(\.\.\/)*([\w\d\-\/]+)\/(.+?)\s*\/>/, '<img src="../images/\3 />')
line.gsub!(/&nbsp;/, ' ')
line.gsub!(/<\/?rb>/, '')
result.push(line)

0 comments on commit b62d65d

Please sign in to comment.