govspeak 3.6.1 → 3.6.2

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: 208629adeff44f5b4bdf055e2b4700a46fc5fb80
4
- data.tar.gz: 966520c069158aeefe79b1bf2e3c3fd533c87664
3
+ metadata.gz: 580a0caf181b2fdc0f51d15207150dba05668db6
4
+ data.tar.gz: f745c4bdd7df05441c0e82f1b4cae4e9cc70af30
5
5
  SHA512:
6
- metadata.gz: 4d44cc1f691a94d4ab384420039bc3581d9b108c45ed34ccc1d8b17880386b50e4dc5e558d84dca03a158c2bd29a7e07b9cc45f5e4bd03e6dc12ab03c0ed8ac0
7
- data.tar.gz: 231abbfa5ddf1d1b766639a0defa7981ded9802311359b77e2b7dc1d08a5ff587c7f85ab4bd89dc921c2d7d6164bc3542b53922c26961efe247a03bdcb388bca
6
+ metadata.gz: 5a04e402f7e2224e20fb06ab180370b41addcd5036f56a93c012bb1b79fb9761bcdc35ebaf5c0f0d3457d91be8ad0455a2e9712578d5951b35238e6f89b6b654
7
+ data.tar.gz: e47d74513a6d3f0a150fba13372f102b6399ed8ea3c5d0effcc28722f4a8cb001f6799ce0b4f4039d0b7d509049260d545eef89ee204e1ac454820353a26202b
@@ -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))
@@ -1,3 +1,3 @@
1
1
  module Govspeak
2
- VERSION = "3.6.1"
2
+ VERSION = "3.6.2"
3
3
  end
@@ -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
-
@@ -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.1
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-03 00:00:00.000000000 Z
12
+ date: 2016-05-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: kramdown