Sha256: 059cbf276560cab540528d809e931cf0438a8059e7c1f9e4b6123f43dd6d39a7
Contents?: true
Size: 1.31 KB
Versions: 4
Compression:
Stored size: 1.31 KB
Contents
require 'spec_helper' describe ReverseMarkdown do let(:input) { File.read('spec/assets/anchors.html') } let(:document) { Nokogiri::HTML(input) } subject { ReverseMarkdown.convert(input) } it { is_expected.to include ' [Foobar](http://foobar.com) ' } it { is_expected.to include ' [Fubar](http://foobar.com "f\*\*\*\*\* up beyond all recognition") ' } it { is_expected.to include ' [**Strong foobar**](http://strong.foobar.com) ' } it { is_expected.to include ' ![](http://foobar.com/logo.png) ' } it { is_expected.to include ' ![foobar image](http://foobar.com/foobar.png) ' } it { is_expected.to include ' ![foobar image 2](http://foobar.com/foobar2.png "this is the foobar image 2") ' } it { is_expected.to include 'extra space after the [anchor](http://foobar.com).'} it { is_expected.to include 'But inline, [there](http://foobar.com) should be a space.'} context "links to ignore" do it { is_expected.to include ' ignore anchor tags with no link text ' } it { is_expected.to include ' not ignore [![An Image](image.png)](foo.html) anchor tags with images' } it { is_expected.to include ' pass through the text of internal jumplinks without treating them as links ' } it { is_expected.to include ' pass through the text of anchor tags with no href without treating them as links ' } end end
Version data entries
4 entries across 4 versions & 1 rubygems