roda-component 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8a4f1ee47ccff2680b381dd4e3bda8fd0fab8278
4
- data.tar.gz: 32aa60c83320c7e1dfd70da62ed0c09f4804f1bb
3
+ metadata.gz: 215bb6602958dc06a8502a62335096657a0850c3
4
+ data.tar.gz: b4371617ad7f91ed5e77f2aa359ce97f3f4526b4
5
5
  SHA512:
6
- metadata.gz: 5f16bfbf9c8c0eb4afc57a156c8bcf37061409f7c10bf19b5f416adb38e6a87ba4c1163ef0fe6abada08e8e5657a7e3f9c24d6102e86eda5ad43d8bed2f4c7c7
7
- data.tar.gz: 1ac0e1c0a26e4a48fa19114e7a2e33555b5a0e020cca794bcb020dfc64f3a88a9bd31fbdf58fde6f911df28b6c65e35c37a21ddefc37efb9732f45b2de9b844d
6
+ metadata.gz: 9c93adfa28fff329aeda042c96cecdda13275eb5adb842040cf378d82aea9a2961f972cbae996c908a99182431fe19242628dbcc6199c32614f4d174c4e51b0f
7
+ data.tar.gz: 0a0816a7b3eb6f3f554be124073e7bc8d3dd5eb9e271562b305d7435d2e6ef3bcdd9b3d6cd749aacb74ddb9b6eaaa8080ae7631299fc2d4af17f1e81ec45b0fd
@@ -154,7 +154,11 @@ class Roda
154
154
  if defined? Oga
155
155
  Oga.parse_html(raw_html)
156
156
  elsif defined? Nokogiri
157
- Nokogiri::HTML(raw_html)
157
+ if raw_html[/\A<!DOCTYPE/]
158
+ Nokogiri::HTML(raw_html)
159
+ else
160
+ Nokogiri::HTML.fragment(raw_html)
161
+ end
158
162
  else
159
163
  warn 'No HTML parsing lib loaded. Please require Nokogiri or Oga'
160
164
  end
@@ -1,5 +1,5 @@
1
1
  class Roda
2
2
  class Component
3
- VERSION = "0.1.0"
3
+ VERSION = "0.1.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: roda-component
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - cj
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-12 00:00:00.000000000 Z
11
+ date: 2015-01-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: opal