govspeak 3.0.0 → 3.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +4 -0
- data/lib/govspeak.rb +2 -2
- data/lib/govspeak/html_validator.rb +4 -4
- data/lib/govspeak/version.rb +1 -1
- metadata +4 -4
data/CHANGELOG.md
CHANGED
data/lib/govspeak.rb
CHANGED
@@ -49,8 +49,8 @@ module Govspeak
|
|
49
49
|
HTMLEntities.new.decode(to_html.gsub(/(?:<[^>]+>|\s)+/, " ").strip)
|
50
50
|
end
|
51
51
|
|
52
|
-
def valid?
|
53
|
-
Govspeak::HtmlValidator.new(@source).valid?
|
52
|
+
def valid?(validation_options = {})
|
53
|
+
Govspeak::HtmlValidator.new(@source, validation_options).valid?
|
54
54
|
end
|
55
55
|
|
56
56
|
def headers
|
@@ -1,8 +1,8 @@
|
|
1
1
|
class Govspeak::HtmlValidator
|
2
|
-
attr_reader :
|
2
|
+
attr_reader :govspeak_string
|
3
3
|
|
4
|
-
def initialize(
|
5
|
-
@
|
4
|
+
def initialize(govspeak_string, sanitization_options = {})
|
5
|
+
@govspeak_string = govspeak_string.dup.force_encoding(Encoding::UTF_8)
|
6
6
|
@sanitization_options = sanitization_options
|
7
7
|
end
|
8
8
|
|
@@ -22,6 +22,6 @@ class Govspeak::HtmlValidator
|
|
22
22
|
end
|
23
23
|
|
24
24
|
def govspeak_to_html
|
25
|
-
Govspeak::Document.new(
|
25
|
+
Govspeak::Document.new(govspeak_string).to_html
|
26
26
|
end
|
27
27
|
end
|
data/lib/govspeak/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: govspeak
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.1.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2014-08-
|
13
|
+
date: 2014-08-18 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: kramdown
|
@@ -184,7 +184,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
184
184
|
version: '0'
|
185
185
|
segments:
|
186
186
|
- 0
|
187
|
-
hash:
|
187
|
+
hash: 453983176966331010
|
188
188
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
189
189
|
none: false
|
190
190
|
requirements:
|
@@ -193,7 +193,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
193
193
|
version: '0'
|
194
194
|
segments:
|
195
195
|
- 0
|
196
|
-
hash:
|
196
|
+
hash: 453983176966331010
|
197
197
|
requirements: []
|
198
198
|
rubyforge_project:
|
199
199
|
rubygems_version: 1.8.23
|