~ubuntu-branches/ubuntu/oneiric/libfeedparser-ruby/oneiric

« back to all changes in this revision

Viewing changes to lib/feedparser/textconverters.rb

  • Committer: Bazaar Package Importer
  • Author(s): Lucas Nussbaum, Lucas Nussbaum, Gunnar Wolf
  • Date: 2009-07-28 00:12:36 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20090728001236-ho0q45aaajo90dky
Tags: 0.7-1
[ Lucas Nussbaum ]
* New upstream release.

[ Gunnar Wolf ]
* Changed section to Ruby as per ftp-masters' request

[ Lucas Nussbaum ]
* Update to policy 3.8.2; no changes needed.
* Add misc:Depends to Depends so lintian is happier.
* Move ruby-pkg-tools to Build-Depends so lintian is happier. also
  move others Build-Depends-Indep to Build-Depends. We don't build any
  arch-specific package anyway, so splitting Build-Depends-Indep and
  Build-Depends in pointless.

Show diffs side-by-side

added added

removed removed

Lines of Context:
59
59
      text.gsub!(/\A\s*(.*)\Z/m, '<p>\1</p>')
60
60
      text.gsub!(/\s*\n(\s*\n)+\s*/, "</p>\n<p>")
61
61
      # uris
62
 
      text.gsub!(/(#{URI::regexp(['http','ftp','https'])})/,
63
 
          '<a href="\1">\1</a>')
 
62
      text.gsub!(/([^'"])(#{URI::regexp(['http','ftp','https'])})/,
 
63
          '\1<a href="\2">\2</a>')
64
64
    end
65
65
    # Handle broken hrefs in <a> and <img>
66
66
    if feed and feed.link