File tree Expand file tree Collapse file tree 2 files changed +15
-8
lines changed
lib/motion-markdown-it-plugins/emoji/plugin Expand file tree Collapse file tree 2 files changed +15
-8
lines changed Original file line number Diff line number Diff line change @@ -6,16 +6,10 @@ def quoteRE(str)
6
6
str . gsub ( /([.?*+^$\[ \] \\ (){}|-])/ , '\\\\\1' )
7
7
end
8
8
9
- # convert keys from symbols into strings
10
- #------------------------------------------------------------------------------
11
- def stringify ( symbol_hash )
12
- symbol_hash . collect { |k , v | [ k . to_s , v ] } . to_h
13
- end
14
-
15
9
#------------------------------------------------------------------------------
16
10
def normalize_opts ( options )
17
- emojies = stringify ( options [ :defs ] )
18
- shortcuts = stringify ( options [ :shortcuts ] )
11
+ emojies = stringify_keys ( options [ :defs ] )
12
+ shortcuts = stringify_keys ( options [ :shortcuts ] )
19
13
20
14
# Filter emojies by whitelist, if needed
21
15
if options [ :enabled ] . length > 0
@@ -63,6 +57,16 @@ def normalize_opts(options)
63
57
replaceRE : replaceRE
64
58
}
65
59
end
60
+
61
+ private
62
+
63
+ # convert keys from symbols into strings
64
+ #------------------------------------------------------------------------------
65
+ def stringify_keys ( symbol_hash )
66
+ result = { }
67
+ symbol_hash . each_key { |key | result [ key . to_s ] = symbol_hash [ key ] }
68
+ result
69
+ end
66
70
end
67
71
end
68
72
end
Original file line number Diff line number Diff line change @@ -22,3 +22,6 @@ Motion::Project::App.setup do |app|
22
22
23
23
app . detect_dependencies = true
24
24
end
25
+
26
+ desc "Open app with a command line console"
27
+ task :console => :run
You can’t perform that action at this time.
0 commit comments