Sha256: 85f85b1aa1f444851ccb29c995786868096cad72695ead8c34b21fbc95e7bfcd

Contents?: true

Size: 329 Bytes

Versions: 25

Compression:

Stored size: 329 Bytes

Contents

module HTML
  class Pipeline
    # HTML Filter for replacing http github urls with https versions.
    class HttpsFilter < Filter
      def call
        doc.css('a[href^="http://github.com"]').each do |element|
          element['href'] = element['href'].sub(/^http:/,'https:')
        end
        doc
      end
    end
  end
end

Version data entries

25 entries across 25 versions & 3 rubygems

Version Path
html-pipeline-1.8.0 lib/html/pipeline/https_filter.rb
html-pipeline-1.7.0 lib/html/pipeline/https_filter.rb
html-pipeline-1.6.0 lib/html/pipeline/https_filter.rb
html-pipeline-1.5.0 lib/html/pipeline/https_filter.rb
html-pipeline-1.4.0 lib/html/pipeline/https_filter.rb
html-pipeline-1.3.0 lib/html/pipeline/https_filter.rb
html-pipeline-1.1.0 lib/html/pipeline/https_filter.rb
html-pipeline-1.0.0 lib/html/pipeline/https_filter.rb
html-pipeline-0.3.1 lib/html/pipeline/https_filter.rb
html-pipeline-0.3.0 lib/html/pipeline/https_filter.rb
html-pipeline-0.2.1 lib/html/pipeline/https_filter.rb
html-pipeline-0.2.0 lib/html/pipeline/https_filter.rb
html-pipeline-0.1.0 lib/html/pipeline/https_filter.rb
html-pipeline-0.0.14 lib/html/pipeline/https_filter.rb
html-pipeline-0.0.13 lib/html/pipeline/https_filter.rb
geothird-html-pipeline-0.0.12 lib/html/pipeline/https_filter.rb
html-pipeline-0.0.12 lib/html/pipeline/https_filter.rb
html-pipeline-0.0.11 lib/html/pipeline/https_filter.rb
html-pipeline-0.0.10 lib/html/pipeline/https_filter.rb
html-pipeline-0.0.8 lib/html/pipeline/https_filter.rb