govspeak 2.0.0 → 2.0.2

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/CHANGELOG.md CHANGED
@@ -1,3 +1,12 @@
1
+ ## 2.0.2
2
+ * Fix a bug with the HtmlValidator to do with kramdown now respecting character
3
+ encodings of input data.
4
+
5
+ ## 2.0.1
6
+
7
+ * Upgrade to newest kramdown, which fixes a number of bugs, including rendering
8
+ multiple footnote references and handling underscores in attachment titles
9
+
1
10
  ## 2.0.0
2
11
 
3
12
  * Upgrade sanitize dependency to 2.1.0
@@ -2,7 +2,7 @@ class Govspeak::HtmlValidator
2
2
  attr_reader :string
3
3
 
4
4
  def initialize(string)
5
- @string = string
5
+ @string = string.dup.force_encoding(Encoding::UTF_8)
6
6
  end
7
7
 
8
8
  def invalid?
@@ -1,3 +1,3 @@
1
1
  module Govspeak
2
- VERSION = "2.0.0"
2
+ VERSION = "2.0.2"
3
3
  end
@@ -235,8 +235,8 @@ Teston
235
235
  end
236
236
 
237
237
  test "should be able to override default 'entity output' option" do
238
- html = Govspeak::Document.new("&", entity_output: :numeric).to_html
239
- assert html.include?("&")
238
+ html = Govspeak::Document.new("¥", entity_output: :numeric).to_html
239
+ assert html.include?("¥")
240
240
  end
241
241
 
242
242
  test "should be assume link with invalid uri is internal" do
@@ -7,6 +7,7 @@ class HtmlValidatorTest < Test::Unit::TestCase
7
7
  "*bold text*",
8
8
  "* bullet",
9
9
  "- alternative bullet",
10
+ "double -- dash -- ndash",
10
11
  "+ another bullet",
11
12
  "1. Numbered list",
12
13
  "s2. Step",
@@ -26,8 +27,8 @@ class HtmlValidatorTest < Test::Unit::TestCase
26
27
  "$A Hercules House Hercules Road London SE1 7DU $A",
27
28
  "$D [An example form download link](http://example.com/ \"Example form\") Something about this form download $D",
28
29
  "$EAn example for the citizen$E - examples boxout",
29
- "$!...$! - answer summary",
30
- "{::highlight-answer}...{:/highlight-answer} - creates a large pink highlight box with optional preamble text and giant text denoted with **.",
30
+ "$!Answer$! - answer summary",
31
+ "{::highlight-answer}Highlighted answer{:/highlight-answer} - creates a large pink highlight box with optional preamble text and giant text denoted with **.",
31
32
  "{::highlight-answer}",
32
33
  "The VAT rate is *20%*",
33
34
  "{:/highlight-answer}",
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: 2.0.0
4
+ version: 2.0.2
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-04 00:00:00.000000000 Z
13
+ date: 2014-08-13 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: kramdown
@@ -19,7 +19,7 @@ dependencies:
19
19
  requirements:
20
20
  - - ~>
21
21
  - !ruby/object:Gem::Version
22
- version: 0.13.3
22
+ version: 1.4.1
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -27,7 +27,7 @@ dependencies:
27
27
  requirements:
28
28
  - - ~>
29
29
  - !ruby/object:Gem::Version
30
- version: 0.13.3
30
+ version: 1.4.1
31
31
  - !ruby/object:Gem::Dependency
32
32
  name: htmlentities
33
33
  requirement: !ruby/object:Gem::Requirement
@@ -184,7 +184,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
184
184
  version: '0'
185
185
  segments:
186
186
  - 0
187
- hash: 3723599467826747284
187
+ hash: -1322540803525731364
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: 3723599467826747284
196
+ hash: -1322540803525731364
197
197
  requirements: []
198
198
  rubyforge_project:
199
199
  rubygems_version: 1.8.23