markitdown 0.0.6 → 0.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/markitdown.rb +1 -1
- data/lib/markitdown/version.rb +1 -1
- data/spec/tag_spec.rb +9 -1
- metadata +4 -4
data/lib/markitdown.rb
CHANGED
@@ -98,7 +98,7 @@ module Markitdown
|
|
98
98
|
results << pre
|
99
99
|
when "a"
|
100
100
|
results << " ["
|
101
|
-
after = ["](#{node.attributes["href"].value}) "]
|
101
|
+
after = ["](#{node.attributes["href"].value if node.attributes["href"]}) "]
|
102
102
|
strip_content = true
|
103
103
|
when "img"
|
104
104
|
results << "  "
|
163
163
|
end
|
164
164
|
end
|
165
165
|
|
166
|
+
context "When parsing a link without an href" do
|
167
|
+
let(:html) { "<a>this is a link</a>" }
|
168
|
+
|
169
|
+
it "should return valid markdown" do
|
170
|
+
Markitdown.from_html(html).should == " [this is a link]() "
|
171
|
+
end
|
172
|
+
end
|
173
|
+
|
166
174
|
context "When parsing an image" do
|
167
175
|
let(:html) { "<img src='https://www.google.com/images/srpr/logo3w.png' alt='Google Logo'>" }
|
168
176
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: markitdown
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-10
|
12
|
+
date: 2012-11-10 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: nokogiri
|
@@ -96,7 +96,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
96
96
|
version: '0'
|
97
97
|
segments:
|
98
98
|
- 0
|
99
|
-
hash:
|
99
|
+
hash: -705547097769987992
|
100
100
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
101
101
|
none: false
|
102
102
|
requirements:
|
@@ -105,7 +105,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
105
105
|
version: '0'
|
106
106
|
segments:
|
107
107
|
- 0
|
108
|
-
hash:
|
108
|
+
hash: -705547097769987992
|
109
109
|
requirements: []
|
110
110
|
rubyforge_project:
|
111
111
|
rubygems_version: 1.8.24
|