users-and-hashtags 0.0.3 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
@@ -19,8 +19,8 @@ module Rack
|
|
19
19
|
body.each do |b|
|
20
20
|
doc = Nokogiri::HTML(b.to_s)
|
21
21
|
doc.css(@options[:matcher]).each do |d|
|
22
|
-
d.inner_html = d.
|
23
|
-
d.inner_html = d.
|
22
|
+
d.inner_html = d.inner_html.gsub(/(\W)@([\w-]+)?/, '\1<a href="' + "#{@options[:user_url]}" + '\2">@\2</a>')
|
23
|
+
d.inner_html = d.inner_html.gsub(/(\W)#([\w-]+)?/, '\1<a href="' + "#{@options[:hashtag_url]}" + '\2">#\2</a>')
|
24
24
|
end
|
25
25
|
nbody = doc.to_s
|
26
26
|
end
|
data/users-and-hashtags.gemspec
CHANGED
@@ -7,7 +7,7 @@ Gem::Specification.new do |s|
|
|
7
7
|
s.version = Rack::UsersAndHashtags::VERSION
|
8
8
|
s.authors = ["Oliver Lillig"]
|
9
9
|
s.email = ["ol@askedo.de"]
|
10
|
-
s.homepage = ""
|
10
|
+
s.homepage = "https://github.com/eins11/users-and-hashtags"
|
11
11
|
s.summary = %q{Replace @user and #tags with corresponding links}
|
12
12
|
s.description = %q{Replace @user and #tags with corresponding links}
|
13
13
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: users-and-hashtags
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 21
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 5
|
10
|
+
version: 0.0.5
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Oliver Lillig
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-12-
|
18
|
+
date: 2011-12-04 00:00:00 +01:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -54,7 +54,7 @@ files:
|
|
54
54
|
- lib/users-and-hashtags.rb
|
55
55
|
- users-and-hashtags.gemspec
|
56
56
|
has_rdoc: true
|
57
|
-
homepage:
|
57
|
+
homepage: https://github.com/eins11/users-and-hashtags
|
58
58
|
licenses: []
|
59
59
|
|
60
60
|
post_install_message:
|