mdless 2.1.51 → 2.1.53
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +2 -1
- data/lib/mdless/console.rb +330 -315
- data/lib/mdless/emoji.rb +1894 -0
- data/lib/mdless/string.rb +2 -2
- data/lib/mdless/theme.rb +3 -1
- data/lib/mdless/version.rb +1 -1
- data/lib/mdless.rb +1 -1
- metadata +3 -2
data/lib/mdless/string.rb
CHANGED
@@ -18,14 +18,14 @@ class ::String
|
|
18
18
|
if MDLess.theme.key?(keys[0])
|
19
19
|
val = MDLess.theme[keys.shift]
|
20
20
|
else
|
21
|
-
MDLess.log.error("Invalid theme key
|
21
|
+
MDLess.log.error("Invalid theme key!: #{key}") unless keys[0] =~ /^text/
|
22
22
|
return c([:reset])
|
23
23
|
end
|
24
24
|
keys.each do |k|
|
25
25
|
if val.key?(k)
|
26
26
|
val = val[k]
|
27
27
|
else
|
28
|
-
MDLess.log.error("Invalid theme key
|
28
|
+
MDLess.log.error("Invalid theme key@: #{k}")
|
29
29
|
return c([:reset])
|
30
30
|
end
|
31
31
|
end
|
data/lib/mdless/theme.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
module CLIMarkdown
|
2
3
|
module Theme
|
3
4
|
THEME_DEFAULTS = {
|
@@ -105,6 +106,7 @@ module CLIMarkdown
|
|
105
106
|
'equation' => 'b blue'
|
106
107
|
},
|
107
108
|
'super' => 'b green',
|
109
|
+
'deletion' => 'strikethrough red',
|
108
110
|
'text' => 'white',
|
109
111
|
'at_tags' => {
|
110
112
|
'tag' => 'magenta',
|
@@ -116,7 +118,7 @@ module CLIMarkdown
|
|
116
118
|
'task' => 'white',
|
117
119
|
'note' => 'd white'
|
118
120
|
}
|
119
|
-
}
|
121
|
+
}.freeze
|
120
122
|
|
121
123
|
def load_theme_file(theme_file)
|
122
124
|
raise "Theme #{theme_file} doesn't exist" unless File.exist?(theme_file)
|
data/lib/mdless/version.rb
CHANGED
data/lib/mdless.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mdless
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.53
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brett Terpstra
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-01-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: redcarpet
|
@@ -139,6 +139,7 @@ files:
|
|
139
139
|
- lib/mdless/colors.rb
|
140
140
|
- lib/mdless/console.rb
|
141
141
|
- lib/mdless/converter.rb
|
142
|
+
- lib/mdless/emoji.rb
|
142
143
|
- lib/mdless/hash.rb
|
143
144
|
- lib/mdless/string.rb
|
144
145
|
- lib/mdless/tables.rb
|