md_emoji 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -19,7 +19,7 @@ module MdEmoji
19
19
  #
20
20
  # Valid emoji charaters are listed in +MdEmoji::EMOJI+
21
21
  def replace_emoji(text)
22
- text.gsub(/:(\S+):/) do |emoji|
22
+ text.gsub(/:([^\s:])+:/) do |emoji|
23
23
 
24
24
  emoji_code = emoji #.gsub("|", "_")
25
25
  emoji = emoji_code.gsub(":", "")
@@ -1,3 +1,3 @@
1
1
  module MdEmoji
2
- VERSION = "1.0.1"
2
+ VERSION = "1.0.2"
3
3
  end
@@ -3,3 +3,8 @@
3
3
  Started GET "/" for 127.0.0.1 at 2013-03-18 09:55:16 -0400
4
4
  Processing by EmojiController#index as HTML
5
5
  Completed 200 OK in 229ms (Views: 228.9ms)
6
+
7
+
8
+ Started GET "/" for 127.0.0.1 at 2013-12-12 16:29:07 -0500
9
+ Processing by EmojiController#index as HTML
10
+ Completed 200 OK in 88ms (Views: 87.8ms)
@@ -87,6 +87,15 @@ class RendererTest < ActiveSupport::TestCase
87
87
  "<br> not present in parsed text: #{parsed_text}"
88
88
  end
89
89
 
90
+ test "works with multiple emoji without spaces" do
91
+ @markdown = Redcarpet::Markdown.new(MdEmoji::Render.new)
92
+ text = ":ship::dash:"
93
+ parsed_text = @markdown.render(text)
94
+
95
+ assert_emoji 'ship', parsed_text
96
+ assert_emoji 'dash', parsed_text
97
+ end
98
+
90
99
  test "does not render emoji in codeblocks" do
91
100
  text = %{```ruby
92
101
  def hello
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: md_emoji
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-03-18 00:00:00.000000000 Z
12
+ date: 2013-12-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: railties
@@ -1885,7 +1885,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
1885
1885
  version: '0'
1886
1886
  segments:
1887
1887
  - 0
1888
- hash: 2514103228194104676
1888
+ hash: 4009085570340830449
1889
1889
  required_rubygems_version: !ruby/object:Gem::Requirement
1890
1890
  none: false
1891
1891
  requirements:
@@ -1894,7 +1894,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1894
1894
  version: '0'
1895
1895
  segments:
1896
1896
  - 0
1897
- hash: 2514103228194104676
1897
+ hash: 4009085570340830449
1898
1898
  requirements: []
1899
1899
  rubyforge_project:
1900
1900
  rubygems_version: 1.8.23