mdless 1.0.33 → 1.0.35

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: 124d704b9e69d3c7afbba30442cc2e3f3b9ebd92edc16b345c3a5489b64a5823
4
- data.tar.gz: 0e257d07a7c684441140ad2d526711c41127f97af37ae798311d9f04e5f832fd
3
+ metadata.gz: 6dce520c83c9816d3124e96eefd5f76af0fdb7f1b98515d1b1cbe2dd602fa34e
4
+ data.tar.gz: fa054888f473b9cab79cdd4446d39092d0e947f20e4feecccc07ff47ab55fc55
5
5
  SHA512:
6
- metadata.gz: 621d98dd881546000fdff38ad51e691d1c729fce4a87f96dc19b5041b9fefefd826245ed9b865db272165b591a0d300b6d1c5dca71d2612b611bc9549dce3181
7
- data.tar.gz: 33287f2fd78bdc15fd9bc15003a30df2396688475864063e012d96418c8e390a2c2e6c67c746831608a40e4bea0ee594540e209dbcc6806d3e7950c870406785
6
+ metadata.gz: e932ba8df8b972fb44d99e6e834abf8068c3c419c7f174b4ca29075dc5d03ab186a8fb5fdf3ff2d4e4ba8679db8f5f493761ebfd4d89f3192f009dcf262aae86
7
+ data.tar.gz: a2862dcbb7c98960b115afa053b9585e0094489e531ca6daebbf0ce961b36e4f933170ba0ed42329c3cf779e6bcafd00436e765380bfc87a47579564d6001f48
@@ -626,23 +626,23 @@ module CLIMarkdown
626
626
  input.gsub!(/(?i-m)(^[ \t]*[`~]{3,})([\s\S]*?)\n([\s\S]*?)\1/m) do
627
627
  language = nil
628
628
  m = Regexp.last_match
629
- first_indent = m[1].gsub(/\t/,' ').match(/^ */)[0].size
629
+ first_indent = m[1].gsub(/\t/, ' ').match(/^ */)[0].size
630
630
 
631
- if m[2] && m[2].strip.length > 0
631
+ if m[2] && !m[2].strip.empty?
632
632
  language = m[2].strip.split(/ /)[0]
633
- code_block = pad_max(m[3].to_s,'')
634
- leader = language ? language : 'code'
633
+ code_block = pad_max(m[3].to_s, '')
634
+ leader = language || 'code'
635
635
  else
636
636
  first_line = m[3].to_s.split(/\n/)[0]
637
637
 
638
- if first_line =~ /^\s*#!.*\/.+/
639
- shebang = first_line.match(/^\s*#!.*\/(?:env )?([^\/]+)$/)
638
+ if first_line =~ %r{^\s*#!.*/.+}
639
+ shebang = first_line.match(%r{^\s*#!.*/(?:env )?([^/]+)$})
640
640
  language = shebang[1]
641
641
  code_block = m[3]
642
- leader = shebang[1] ? shebang[1] : 'code'
642
+ leader = shebang[1] || 'code'
643
643
  else
644
644
  code_block = pad_max(m[3].to_s, "#{color('code_block eol')}¬")
645
- leader = language ? language : 'code'
645
+ leader = language || 'code'
646
646
  end
647
647
  end
648
648
  leader += xc
@@ -1,3 +1,3 @@
1
1
  module CLIMarkdown
2
- VERSION = '1.0.33'
2
+ VERSION = '1.0.35'
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: 1.0.33
4
+ version: 1.0.35
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brett Terpstra
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-06-03 00:00:00.000000000 Z
11
+ date: 2023-08-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake