mdless 0.0.8 → 0.0.9

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
  SHA1:
3
- metadata.gz: 8c90942cd09b87938acb76039218272c24cfe259
4
- data.tar.gz: 910c0cf283c54a502329e867d161635a6ea6b9e6
3
+ metadata.gz: a4bb4133ae1d8d4e3607f02a75c8ef92edb6ca92
4
+ data.tar.gz: 3104daadc69c2dd78978247eb3bee0d607884a9f
5
5
  SHA512:
6
- metadata.gz: 9bd405018da73047f82adbf0e1931a05a84baf598cc3cfe68911bb5fb3cbe7c2c41ead289d3c307f38bd3c6daf3de691a40cfcdb3f32e24a4f56eb0a97813fc5
7
- data.tar.gz: d22e8c3e662d02d5d6f5b7ed2bc44d6aa79d2c04598c90b7ad2844cb8e425cada82c1cdc34f8b295e5b3b9fc6a2fd13ac3dfefc83376754ffcdce56c197da6bc
6
+ metadata.gz: fd92f5704dedca5c71a0571bcf34080cc0c122c888a4b3e65f20ae13bc353428a85a688ec07915ce699609cb6e6fec79fcb93b8c1d893cef388e2e4482febc71
7
+ data.tar.gz: 705a61c4a88dee79316c5cc61bb24a99ccfaed0c31d367092f4098768f96a1d2c6bdadbb4f022b8fdfbdf6450ede5833ff26458c1970f182afa128f431a293ef
data/README.md CHANGED
@@ -42,7 +42,7 @@ The pager used is determined by system configuration in this order of preference
42
42
 
43
43
  -s, --section=TITLE Output only a headline-based section of
44
44
  the input
45
- -w, --width=COLUMNS Column width to format for (default 80)
45
+ -w, --width=COLUMNS Column width to format for (default terminal width)
46
46
  -p, --[no-]pager Formatted output to pager (default on)
47
47
  -P Disable pager (same as --no-pager)
48
48
  -c, --[no-]color Colorize output (default on)
@@ -21,12 +21,9 @@ module CLIMarkdown
21
21
  @options[:section] = section
22
22
  end
23
23
 
24
- @options[:width] = 80
25
- opts.on( '-w', '--width=COLUMNS', 'Column width to format for (default 80)' ) do |columns|
24
+ @options[:width] = %x{tput cols}.strip.to_i
25
+ opts.on( '-w', '--width=COLUMNS', 'Column width to format for (default terminal width)' ) do |columns|
26
26
  @options[:width] = columns.to_i
27
- if @options[:width] = 0
28
- @options[:width] = %x{tput cols}.strip.to_i
29
- end
30
27
  end
31
28
 
32
29
  @options[:pager] = true
@@ -96,7 +93,7 @@ module CLIMarkdown
96
93
 
97
94
  optparse.parse!
98
95
 
99
- @cols = @options[:width] || %x{tput cols}.strip.to_i * 0.9
96
+ @cols = @options[:width]
100
97
  @output = ''
101
98
 
102
99
  input = ''
@@ -393,7 +390,6 @@ module CLIMarkdown
393
390
  "#" * (match[1].length - h_adjust)
394
391
  end
395
392
 
396
- # TODO: Probably easiest to just collect these with line indexes, remove until other highlighting is finished
397
393
  input.gsub!(/(?i-m)([`~]{3,})([\s\S]*?)\n([\s\S]*?)\1/ ) do |cb|
398
394
  m = Regexp.last_match
399
395
  leader = m[2] ? m[2].upcase + ":" : 'CODE:'
@@ -1,3 +1,3 @@
1
1
  module CLIMarkdown
2
- VERSION = '0.0.8'
2
+ VERSION = '0.0.9'
3
3
  end
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: 0.0.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brett Terpstra
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-21 00:00:00.000000000 Z
11
+ date: 2016-06-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake