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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bfc7be5b86915adb7228f7b1f96c7256d65c79018d82ee17509fc30dc3e79c2a
4
- data.tar.gz: a09b48ae7c7caf2164edadcca0b721c02722d95c1fdf7c4da23b0036d80598b2
3
+ metadata.gz: cd020f19c756d65ae77a7776165c1aeadd0b2339a9dcabf82018f7e7a10105fc
4
+ data.tar.gz: 650881325a80cd06c61656f339a30d8e45f74b667842691c82e9a2b6b0ab3184
5
5
  SHA512:
6
- metadata.gz: f06ed4246326adf3d5fd3ee1b9ce9fa8a2a2ca2a0fd6ce40ed84a81d5db68cfe011017cba259a335b17bf834a8c88f9a34e80eee6fe141cb3aefeca9dca88c3e
7
- data.tar.gz: aac682392f089688a36c22460e5b7150176f1b806a00ed162c87f6761133673058d54b1f85cb6480973e36762e8492c8014b09da8c5a2a2abf538a12c53b9139
6
+ metadata.gz: f41c118304004d8eb6f332b1edc66a51d6a4f346140acceb93db291bcade96635172f9e0c412119e60aad889ba6e4354e1491bf6ebf8d59b86770e408ff930fe
7
+ data.tar.gz: 5a9bdc6051825f50720a20a7767dbe759982a6b368f08b20905b703ffe7882d654aed737c919e445231bffefbb67328774856518546ba15e86667adf23c7b9c3
@@ -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+/, ' ').strip}#{xc}#{x}\n\n"
235
+ "#{xc}#{text.gsub(/ +/, ' ').gsub(/\n+(?![:-])/, ' ').strip}#{xc}#{x}\n\n"
236
236
  end
237
237
  end
238
238
 
@@ -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, false)
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module CLIMarkdown
4
- VERSION = '2.0.24'
4
+ VERSION = '2.1.1'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mdless
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.24
4
+ version: 2.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brett Terpstra