html-pipeline-linuxfr 0.14.7 → 0.14.8
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/lib/html/pipeline/custom_links_filter.rb +7 -1
- data/lib/html/pipeline/version.rb +1 -1
- 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: 8b450dcb69cc30e0e13a6f064fbf45d1377447b4
|
|
4
|
+
data.tar.gz: 6f4ad064d2962c1da71c023e8bd6aa08b7565e5a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1ed15d94ba14ca371d560c03ac8ad01308d89f2bec5d4df548f449ad87122688086f2ac95f1eb8fb5a4f12acfe26db50525343686892ea093658453fba84107f
|
|
7
|
+
data.tar.gz: a50ff15601fc1bfdc846b47eda9aff8f241d7611eaeb8046caf231da3ed692f1b1e7d29751b7edc3654f92a8e70bc238ae1d59de78141f4b27de418bca188c75
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
# encoding: utf-8
|
|
2
|
+
require "active_support/core_ext/string/inflections"
|
|
3
|
+
|
|
2
4
|
module HTML
|
|
3
5
|
class Pipeline
|
|
4
6
|
|
|
@@ -29,7 +31,11 @@ module HTML
|
|
|
29
31
|
|
|
30
32
|
def process_internal_wiki_links(text)
|
|
31
33
|
base_url = "//#{context[:host]}/wiki"
|
|
32
|
-
text.gsub(LF_REGEXP
|
|
34
|
+
text.gsub(LF_REGEXP) do
|
|
35
|
+
word = $1
|
|
36
|
+
slug = word.parameterize
|
|
37
|
+
"<a href=\"#{base_url}/#{slug}\" title=\"#{LF_TITLE}\">#{word}</a>"
|
|
38
|
+
end
|
|
33
39
|
end
|
|
34
40
|
|
|
35
41
|
def process_wikipedia_links(text)
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: html-pipeline-linuxfr
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.14.
|
|
4
|
+
version: 0.14.8
|
|
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: 2013-
|
|
13
|
+
date: 2013-10-12 00:00:00.000000000 Z
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
16
16
|
name: nokogiri
|