govspeak 3.6.1 → 3.6.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/govspeak/version.rb +1 -1
- data/lib/kramdown/parser/kramdown_with_automatic_external_links.rb +1 -2
- data/test/govspeak_test.rb +10 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 580a0caf181b2fdc0f51d15207150dba05668db6
|
|
4
|
+
data.tar.gz: f745c4bdd7df05441c0e82f1b4cae4e9cc70af30
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5a04e402f7e2224e20fb06ab180370b41addcd5036f56a93c012bb1b79fb9761bcdc35ebaf5c0f0d3457d91be8ad0455a2e9712578d5951b35238e6f89b6b654
|
|
7
|
+
data.tar.gz: e47d74513a6d3f0a150fba13372f102b6399ed8ea3c5d0effcc28722f4a8cb001f6799ce0b4f4039d0b7d509049260d545eef89ee204e1ac454820353a26202b
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
## 3.6.2
|
|
2
|
+
|
|
3
|
+
* Fix bug with link parsing introduced in Kramdown 1.6.0 with the "inline attribute lists" feature which clashed with our monkey patch [#75](https://github.com/alphagov/govspeak/pull/75)
|
|
4
|
+
|
|
1
5
|
## 3.6.1
|
|
2
6
|
|
|
3
7
|
* Update minimum Kramdown version from 1.5.0 to 1.10.0 ([changelog](https://github.com/gettalong/kramdown/tree/2cd02dfacda041d3108a039e085f804645a9d538/doc/news))
|
data/lib/govspeak/version.rb
CHANGED
|
@@ -26,7 +26,7 @@ EOF
|
|
|
26
26
|
super
|
|
27
27
|
end
|
|
28
28
|
|
|
29
|
-
def add_link(el, href, title, alt_text = nil)
|
|
29
|
+
def add_link(el, href, title, alt_text = nil, ial = nil)
|
|
30
30
|
if el.type == :a
|
|
31
31
|
begin
|
|
32
32
|
host = Addressable::URI.parse(href).host
|
|
@@ -42,4 +42,3 @@ EOF
|
|
|
42
42
|
end
|
|
43
43
|
end
|
|
44
44
|
end
|
|
45
|
-
|
data/test/govspeak_test.rb
CHANGED
|
@@ -254,6 +254,16 @@ Teston
|
|
|
254
254
|
assert_html_output '<p><a rel="external" href="http://www.google.com">external link without x markers</a></p>'
|
|
255
255
|
end
|
|
256
256
|
|
|
257
|
+
# Based on Kramdown inline attribute list (IAL) test:
|
|
258
|
+
# https://github.com/gettalong/kramdown/blob/627978525cf5ee5b290d8a1b8675aae9cc9e2934/test/testcases/span/01_link/link_defs_with_ial.text
|
|
259
|
+
test_given_govspeak "External link definitions with [attr] and [attr 2] and [attr 3] and [attr before]\n\n[attr]: http://example.com 'title'\n{: hreflang=\"en\" .test}\n\n[attr 2]: http://example.com 'title'\n{: hreflang=\"en\"}\n{: .test}\n\n[attr 3]: http://example.com\n{: .test}\ntest\n\n{: hreflang=\"en\"}\n{: .test}\n[attr before]: http://example.com" do
|
|
260
|
+
assert_html_output "<p>External link definitions with <a rel=\"external\" hreflang=\"en\" class=\"test\" href=\"http://example.com\" title=\"title\">attr</a> and <a rel=\"external\" hreflang=\"en\" class=\"test\" href=\"http://example.com\" title=\"title\">attr 2</a> and <a rel=\"external\" class=\"test\" href=\"http://example.com\">attr 3</a> and <a rel=\"external\" hreflang=\"en\" class=\"test\" href=\"http://example.com\">attr before</a></p>\n\n<p>test</p>"
|
|
261
|
+
end
|
|
262
|
+
|
|
263
|
+
test_given_govspeak "External link with [inline attribute list] (IAL)\n\n[inline attribute list]: http://example.com 'title'\n{: hreflang=\"en\" .test}" do
|
|
264
|
+
assert_html_output '<p>External link with <a rel="external" hreflang="en" class="test" href="http://example.com" title="title">inline attribute list</a> (IAL)</p>'
|
|
265
|
+
end
|
|
266
|
+
|
|
257
267
|
test_given_govspeak "[external link with rel attribute](http://www.google.com){:rel='next'}" do
|
|
258
268
|
assert_html_output '<p><a rel="next" href="http://www.google.com">external link with rel attribute</a></p>'
|
|
259
269
|
end
|
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.6.
|
|
4
|
+
version: 3.6.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ben Griffiths
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2016-05-
|
|
12
|
+
date: 2016-05-09 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: kramdown
|