mumukit-content-type 1.8.0 → 1.8.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mumukit/content_type/emoji.rb +4 -5
- data/lib/mumukit/content_type/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2639ef97bf0f0aa18b30ecf68e13c00ff35489817185eb33cb4994cc4d3c34d5
|
4
|
+
data.tar.gz: 757d5badf75ff9a5ee8e799308e155a39a5049ed98e077e8a8fd1c1b0d212397
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dcfbd78109450fc46f919108c3e98be2039f2de51855897f1577708c63cb6de474d78c37baa4dbc1a6176970cdbb5a56b8a5860f071cdf840889d1586b190d04
|
7
|
+
data.tar.gz: dff6bbc9434d06e3ada387b3a911b150bf17e815d709e3476f9696458f57c3dc47d20a6f0047b36dd5c964de426cc073a31b23cfe92dfe5145bed6aa713899a4
|
@@ -22,14 +22,13 @@ module Mumukit::ContentType::Emoji
|
|
22
22
|
# Valid emoji charaters are listed in +Mumukit::ContentType::Emoji::EMOJI+
|
23
23
|
def replace_emoji(text)
|
24
24
|
emojis = Mumuki::Emojis::EMOJIS
|
25
|
-
|
26
|
-
text.gsub(/:(#{short_names}):/) do |short_name|
|
25
|
+
text.gsub(/:([^\s:])+:/) do |short_name|
|
27
26
|
short_code = short_name.gsub(':', '')
|
28
|
-
|
29
|
-
|
27
|
+
emoji = emojis[short_code]
|
28
|
+
if emoji
|
30
29
|
%{<i class="mu-emoji #{emoji['ca']} _#{emoji['co']}" title="#{short_name}"></i>}
|
31
30
|
else
|
32
|
-
|
31
|
+
short_name
|
33
32
|
end
|
34
33
|
end
|
35
34
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mumukit-content-type
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.8.
|
4
|
+
version: 1.8.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Franco Leonardo Bulgarelli
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-09-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|