mdless 2.0.24 → 2.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mdless/console.rb +1 -1
- data/lib/mdless/converter.rb +7 -1
- data/lib/mdless/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cd020f19c756d65ae77a7776165c1aeadd0b2339a9dcabf82018f7e7a10105fc
|
4
|
+
data.tar.gz: 650881325a80cd06c61656f339a30d8e45f74b667842691c82e9a2b6b0ab3184
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f41c118304004d8eb6f332b1edc66a51d6a4f346140acceb93db291bcade96635172f9e0c412119e60aad889ba6e4354e1491bf6ebf8d59b86770e408ff930fe
|
7
|
+
data.tar.gz: 5a9bdc6051825f50720a20a7767dbe759982a6b368f08b20905b703ffe7882d654aed737c919e445231bffefbb67328774856518546ba15e86667adf23c7b9c3
|
data/lib/mdless/console.rb
CHANGED
@@ -232,7 +232,7 @@ module Redcarpet
|
|
232
232
|
if MDLess.options[:preserve_linebreaks]
|
233
233
|
"#{xc}#{text.gsub(/ +/, ' ').strip}#{xc}#{x}\n\n"
|
234
234
|
else
|
235
|
-
"#{xc}#{text.gsub(/ +/, ' ').gsub(/\n
|
235
|
+
"#{xc}#{text.gsub(/ +/, ' ').gsub(/\n+(?![:-])/, ' ').strip}#{xc}#{x}\n\n"
|
236
236
|
end
|
237
237
|
end
|
238
238
|
|
data/lib/mdless/converter.rb
CHANGED
@@ -132,6 +132,12 @@ module CLIMarkdown
|
|
132
132
|
`#{ENV['EDITOR']} '#{File.expand_path('~/.config/mdless/config.yml')}'`
|
133
133
|
end
|
134
134
|
|
135
|
+
opts.on('--changes', 'Open the changelog to see recent updates') do
|
136
|
+
changelog = File.join(File.dirname(__FILE__), '..', '..', 'CHANGELOG.md')
|
137
|
+
system "mdless --linebreaks '#{changelog}'"
|
138
|
+
Process.exit 0
|
139
|
+
end
|
140
|
+
|
135
141
|
opts.on('--edit-theme', ["Open the default or specified theme file in #{ENV['EDITOR'] || 'default editor'}. ",
|
136
142
|
"If theme doesn't exist, a new theme file will be populated and opened."].join) do
|
137
143
|
raise 'No $EDITOR defined' unless ENV['EDITOR']
|
@@ -172,7 +178,7 @@ module CLIMarkdown
|
|
172
178
|
end
|
173
179
|
end
|
174
180
|
|
175
|
-
default(:preserve_linebreaks,
|
181
|
+
default(:preserve_linebreaks, true)
|
176
182
|
opts.on('--[no-]linebreaks', 'Preserve line breaks') do |opt|
|
177
183
|
MDLess.options[:preserve_linebreaks] = opt
|
178
184
|
end
|
data/lib/mdless/version.rb
CHANGED