Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
rumoji
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ikcrm_common
rumoji
Commits
b36d4ec2
Commit
b36d4ec2
authored
Jan 31, 2013
by
Mark Wunsch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make emoji code pattern more permissive (to allow for
👍
)
parent
d51e7db9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
6 deletions
+2
-6
lib/rumoji.rb
+2
-6
No files found.
lib/rumoji.rb
View file @
b36d4ec2
...
...
@@ -15,7 +15,7 @@ module Rumoji
end
def
decode
(
str
)
str
.
gsub
(
/:(\w+):/
)
{
|
sym
|
Emoji
.
find
(
$1
.
intern
).
to_s
}
str
.
gsub
(
/:(\
S?\
w+):/
)
{
|
sym
|
Emoji
.
find
(
$1
.
intern
).
to_s
}
end
def
encode_io
(
readable
,
writeable
=
StringIO
.
new
(
""
))
...
...
@@ -29,13 +29,9 @@ module Rumoji
def
decode_io
(
readable
,
writeable
=
StringIO
.
new
(
""
))
readable
.
each_line
do
|
line
|
writeable
.
write
line
.
gsub
(
/:(\w+):/
)
{
|
sym
|
Emoji
.
find
(
$1
.
intern
).
to_s
}
writeable
.
write
decode
(
line
)
end
writeable
end
def
codepoint_as_hex
(
codepoint
)
codepoint
.
to_s
(
16
).
upcase
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment