mdless 2.1.2 → 2.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 35e371ff2a27072cc155a2056f76c99899d65b775ecf00afb5bc661879157c0a
4
- data.tar.gz: a0518a46da56d645de9d84e2ab3089939b8893cd5d50629904462444737d4fe3
3
+ metadata.gz: 6889fdd8408bf2d11ef61f18261c57f50cd806f41595acba1d5dd17e439c95b8
4
+ data.tar.gz: 92ba0555ae5ddd4092a60d5dfdb9c5c7e2a5d6f7914eb4c140bbb1bbc84959fc
5
5
  SHA512:
6
- metadata.gz: cba809f82f5b8c6fbc5dfc46a39f8c6fefb89deb331038ecfc8c685997ab0826c91bc6585312d4659e3aefeb5baeb4bdeb89f20eb3f02777d46697d9f8f14018
7
- data.tar.gz: 100e24adb92faa319a0402cd771a436b52e203c13e3788c83fcdb1f4d5632078c096ad3d7cb9616adbc63aa46861c9375b1b0b28f80269ea63f00246c4443e2f
6
+ metadata.gz: 323b2d8fae576af6fb4fee090d21aef0897f5f3024c6928c648f95944f51395b44e53bef1aa46462094dd61326d29e3f17a173455cb6351616e82c35c377110c
7
+ data.tar.gz: 3601996987a8f4fdb7c4fcc685474ee5895ea4252274acb6c0e2caa5aa766f926ba2e66b694a6ad7fe4f865da69f3f1f919800ad82c15573580a0088a6fce234
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ 2.1.3
2
+ : Respect :width setting in config
3
+
1
4
  2.0.24
2
5
  : Update readme with config descriptions
3
6
  : Code blocks containing YAML with `---` as the first line were being interpreted as Setext headers
data/README.md CHANGED
@@ -235,11 +235,11 @@ function cat -d "Use bat instead of cat unless it's a Markdown file, then use md
235
235
  set -l exts md markdown txt taskpaper
236
236
 
237
237
  if not test -f $argv[-1]
238
- echo "File not found: $argv"
238
+ echo "File not found: $argv[-1]"
239
239
  return 0
240
240
  end
241
241
 
242
- if contains (get_ext $argv) $exts
242
+ if contains (get_ext $argv[-1]) $exts
243
243
  mdless $argv
244
244
  else
245
245
  command bat --style plain --theme OneHalfDark $argv
@@ -117,9 +117,9 @@ module CLIMarkdown
117
117
  default(:width, TTY::Screen.cols)
118
118
  opts.on('-w', '--width=COLUMNS', 'Column width to format for (default: terminal width)') do |columns|
119
119
  MDLess.options[:width] = columns.to_i
120
+ cols = TTY::Screen.cols
121
+ MDLess.options[:width] = cols if MDLess.options[:width] > cols
120
122
  end
121
- cols = TTY::Screen.cols
122
- MDLess.options[:width] = cols if MDLess.options[:width] > cols
123
123
 
124
124
  default(:autolink, true)
125
125
  opts.on('--[no-]autolink', 'Convert bare URLs and emails to <links>') do |p|
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module CLIMarkdown
4
- VERSION = '2.1.2'
4
+ VERSION = '2.1.3'
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.1.2
4
+ version: 2.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brett Terpstra