html-pipeline 2.4.2 → 2.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +5 -0
- data/CHANGELOG.md +4 -0
- data/lib/html/pipeline/toc_filter.rb +11 -1
- data/lib/html/pipeline/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 36a4211b5ddd8a4679ac77a293f2dcf2b3b0be77
|
4
|
+
data.tar.gz: dd973b021aff56b932858d9941ac362c359e63a8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c17fbf3322c6de37d616901aa41cd6c1fc11b02bfb5d3118cde30451e87719d591707da4589024e17e0ae21591ea9e6e8c82f2cdfe17c5848c4902abe05ecb48
|
7
|
+
data.tar.gz: 6ed19c3cf342ff30b07505955b14007ab0e65ec1eb149639d0762aed3a475d90ef29da46829abf68ee3b95f9f81c4f9a90d5a68027f6c5ede50a552bb78bb1a0
|
data/.travis.yml
CHANGED
@@ -15,6 +15,7 @@ gemfile:
|
|
15
15
|
- gemfiles/rails_3.gemfile
|
16
16
|
|
17
17
|
rvm:
|
18
|
+
- 2.4.0
|
18
19
|
- 2.3.1
|
19
20
|
- 2.2.5
|
20
21
|
- 2.1
|
@@ -30,3 +31,7 @@ matrix:
|
|
30
31
|
rvm: 2.1
|
31
32
|
- gemfile: gemfiles/rails_5.gemfile
|
32
33
|
rvm: 2.0
|
34
|
+
- gemfile: gemfiles/rails_4.gemfile
|
35
|
+
rvm: 2.4.0
|
36
|
+
- gemfile: gemfiles/rails_3.gemfile
|
37
|
+
rvm: 2.4.0
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
# CHANGELOG
|
2
2
|
|
3
|
+
## 2.5.0
|
4
|
+
|
5
|
+
* Ruby 2.4 support. Backwards compatible, but bumped minor version so projects can choose to lock at older version [#268](https://github.com/jch/html-pipeline/pull/268)
|
6
|
+
|
3
7
|
## 2.4.2
|
4
8
|
|
5
9
|
* Make EmojiFilter generated img tag HTML attributes configurable [#258](https://github.com/jch/html-pipeline/pull/258)
|
@@ -36,7 +36,7 @@ module HTML
|
|
36
36
|
headers = Hash.new(0)
|
37
37
|
doc.css('h1, h2, h3, h4, h5, h6').each do |node|
|
38
38
|
text = node.text
|
39
|
-
id = text
|
39
|
+
id = ascii_downcase(text)
|
40
40
|
id.gsub!(PUNCTUATION_REGEXP, '') # remove punctuation
|
41
41
|
id.gsub!(' ', '-') # replace spaces with dash
|
42
42
|
|
@@ -50,6 +50,16 @@ module HTML
|
|
50
50
|
result[:toc] = %Q{<ul class="section-nav">\n#{result[:toc]}</ul>} unless result[:toc].empty?
|
51
51
|
doc
|
52
52
|
end
|
53
|
+
|
54
|
+
if RUBY_VERSION >= "2.4"
|
55
|
+
def ascii_downcase(str)
|
56
|
+
str.downcase(:ascii)
|
57
|
+
end
|
58
|
+
else
|
59
|
+
def ascii_downcase(str)
|
60
|
+
str.downcase
|
61
|
+
end
|
62
|
+
end
|
53
63
|
end
|
54
64
|
end
|
55
65
|
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.
|
4
|
+
version: 2.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Tomayko
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2017-01-13 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: nokogiri
|
@@ -104,7 +104,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
104
104
|
version: '0'
|
105
105
|
requirements: []
|
106
106
|
rubyforge_project:
|
107
|
-
rubygems_version: 2.5.
|
107
|
+
rubygems_version: 2.5.2
|
108
108
|
signing_key:
|
109
109
|
specification_version: 4
|
110
110
|
summary: Helpers for processing content through a chain of filters
|