html-pipeline 2.2.1 → 2.2.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 +5 -0
- data/README.md +2 -0
- data/lib/html/pipeline/@mention_filter.rb +1 -1
- data/lib/html/pipeline/version.rb +1 -1
- data/test/html/pipeline/mention_filter_test.rb +6 -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: 16a48d98ee9c3474ccd93042fd1d6d30ecd3a885
|
4
|
+
data.tar.gz: c0b00a50d607e06a9b3b587649c27cd2dcabed2e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e8ff21a81b2fdad7d420923144d024a9c8d99f0623d4f5184ecc94a54f2261a9939ff2009bb774456f52a3c3462cee4971301bf3a7019cbaa815f4840d010850
|
7
|
+
data.tar.gz: 3e2b025fcd1a0c79f2dfe27f39260e1be59de9d45d099108ade7ca11c28d9b64ee36f3b349eda7c66111570faf6efbfd1091876ffc32df0f50460da1f5eef83f
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,10 @@
|
|
1
1
|
# CHANGELOG
|
2
2
|
|
3
|
+
## 2.2.2
|
4
|
+
|
5
|
+
* Fix for calling mention_link_filter with only one argument [#230](https://github.com/jch/html-pipeline/pull/230)
|
6
|
+
* Add html-pipeline-linkify_github to 3rd Party Extensions in README [#228](https://github.com/jch/html-pipeline/pull/228)
|
7
|
+
|
3
8
|
## 2.2.1
|
4
9
|
|
5
10
|
* Soften Nokogiri dependency to versions ">= 1.4" [#208](https://github.com/jch/html-pipeline/pull/208)
|
data/README.md
CHANGED
@@ -248,6 +248,8 @@ Here are some extensions people have built:
|
|
248
248
|
* [html-pipeline-youtube](https://github.com/st0012/html-pipeline-youtube) - An HTML::Pipeline filter for YouTube links
|
249
249
|
* [html-pipeline-flickr](https://github.com/st0012/html-pipeline-flickr) - An HTML::Pipeline filter for Flickr links
|
250
250
|
* [html-pipeline-vimeo](https://github.com/dlackty/html-pipeline-vimeo) - An HTML::Pipeline filter for Vimeo links
|
251
|
+
* [html-pipeline-hashtag](https://github.com/mr-dxdy/html-pipeline-hashtag) - An HTML::Pipeline filter for hashtags
|
252
|
+
* [html-pipeline-linkify_github](https://github.com/jollygoodcode/html-pipeline-linkify_github) - An HTML::Pipeline filter to autolink GitHub urls
|
251
253
|
|
252
254
|
## Instrumenting
|
253
255
|
|
@@ -103,7 +103,7 @@ module HTML
|
|
103
103
|
#
|
104
104
|
# Returns a string with @mentions replaced with links. All links have a
|
105
105
|
# 'user-mention' class name attached for styling.
|
106
|
-
def mention_link_filter(text, base_url='/', info_url=nil, username_pattern)
|
106
|
+
def mention_link_filter(text, base_url='/', info_url=nil, username_pattern=UsernamePattern)
|
107
107
|
self.class.mentioned_logins_in(text, username_pattern) do |match, login, is_mentioned|
|
108
108
|
link =
|
109
109
|
if is_mentioned
|
@@ -203,4 +203,10 @@ class HTML::Pipeline::MentionFilterTest < Minitest::Test
|
|
203
203
|
filter(doc.clone, '/', nil, /test/)
|
204
204
|
assert_equal pattern_count + 1, HTML::Pipeline::MentionFilter::MentionPatterns.length
|
205
205
|
end
|
206
|
+
|
207
|
+
def test_mention_link_filter
|
208
|
+
filter = HTML::Pipeline::MentionFilter.new nil
|
209
|
+
expected = "<a href='/hubot' class='user-mention'>@hubot</a>"
|
210
|
+
assert_equal expected, filter.mention_link_filter("@hubot")
|
211
|
+
end
|
206
212
|
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.2.
|
4
|
+
version: 2.2.2
|
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: 2015-10-
|
12
|
+
date: 2015-10-27 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: nokogiri
|