html-pipeline 2.13.0 → 2.14.0

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
  SHA256:
3
- metadata.gz: e8d5622a3fa6bf3a03909aa620ddb19ff0c2b1b3296a2a019410e1f69a5e4fa1
4
- data.tar.gz: f21358c32997b668bd7c8d70756b18763e049ae1a10bbd65bd87d1a84d723efb
3
+ metadata.gz: a897e9a165c69f5823336a5ca9cf92205c191ad6f90ae0d283be3234a9fefcc4
4
+ data.tar.gz: a0fb7f552a185bc2ffeb4aba3c8c50a5659b0277763ec0dcbbf28b6f4ce3bfc6
5
5
  SHA512:
6
- metadata.gz: e2d55abf9182888317ecdc9e426185ecea7d4047096766082d9f271df78b21fb257bfacbcecf9ca500aac8bc1e7db5a00dbdc9b762bb2cae18205c55228e1215
7
- data.tar.gz: cc8eedcfeb8cebfbd651f0f1ba86391857e825766e1a87d9b4c330f42bdbb881dda9b6690aed17e7134e49c6bd61ff3ff70e7fac08dd03adead8a1ddb90d710c
6
+ metadata.gz: c90bcf04d6113d1c9d7a33a4f0dc235dc9d4e302fa1683e36e4c34e96777a307bd5b76b23bad07a02b6bdea8e5577e90e90a57f346e579bbcc6d287f4023623d
7
+ data.tar.gz: 2ea63f52f5365e66d9742d12d28c248794ad7289bd8e68e7b963e42041c1c7ef30be936cd364ed79cb66c43da73c45e9905b90148cae41ecaab5156aa797b0f6
@@ -8,6 +8,7 @@ module HTML
8
8
  #
9
9
  # Context options:
10
10
  # :autolink - boolean whether to autolink urls
11
+ # :link_mode - :all, :urls or :email_addresses
11
12
  # :link_attr - HTML attributes for the link that will be generated
12
13
  # :skip_tags - HTML tags inside which autolinking will be skipped.
13
14
  # See Rinku.skip_tags
@@ -22,7 +23,11 @@ module HTML
22
23
  flags = 0
23
24
  flags |= context[:flags] if context[:flags]
24
25
 
25
- Rinku.auto_link(html, :urls, context[:link_attr], skip_tags, flags)
26
+ Rinku.auto_link(html, link_mode, context[:link_attr], skip_tags, flags)
27
+ end
28
+
29
+ def link_mode
30
+ context[:link_mode] || :urls
26
31
  end
27
32
  end
28
33
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module HTML
4
4
  class Pipeline
5
- VERSION = '2.13.0'
5
+ VERSION = '2.14.0'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: html-pipeline
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.13.0
4
+ version: 2.14.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Tomayko
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2020-05-28 00:00:00.000000000 Z
13
+ date: 2020-08-11 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activesupport