mdless 2.1.48 → 2.1.51

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: 79c89e3a9daa39f49054d75ea880e0c1be8b9dc68866e9e18aa65c81818a9136
4
- data.tar.gz: fe3c59cb92d6e18dc8847edec2609f2208834841d152c10fc5bdf8288581b521
3
+ metadata.gz: 96835ec2d65e265d4738a18b66a13fbd05a1616ee495291a0fe56842f6c00a53
4
+ data.tar.gz: 1d80c562cc27aadeabfd48f8bd6241d3bd4f9463671c50d87ae91f8f3bc9d170
5
5
  SHA512:
6
- metadata.gz: 6add96cf6d03837e0fd1f60162bcbfe91e3171c4eb9d17143fca40bbb118952210cbd86dd5fb38196debea7cdb22135dfb770a2cc3c192df0a8fadefe9fcad2d
7
- data.tar.gz: 2eea1e22ee468dfd486222b214892e9854a29683ddf64a11c46e490745a27b1249e426f6e954243486db09c8824ab9d9d753273c1230c3e0fb7a0e91adc6ac02
6
+ metadata.gz: 391a9ebf2b8148eeb1f975f52618c8022256da5e8106487f449459c75ebe1d28849c1b7705dbe78bb5d63465dcb2689b61da326cff22790caa3f931ed344fd8c
7
+ data.tar.gz: 507c2797294777788121dd4f25fadb3ffcb9ada779f970434d8989508424c0e773c0ec128479e359f30fb9cdc5bae84daddeb0e96bf4588bc6a48b1d291a2a1a
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ 2.1.50
2
+ : YAML load errors in Ruby 3.3
3
+
1
4
  2.1.46
2
5
  : Fix for table cells containing links
3
6
 
@@ -754,7 +754,7 @@ module Redcarpet
754
754
  m = Regexp.last_match
755
755
  MDLess.log.info("Processing YAML header")
756
756
  begin
757
- MDLess.meta = YAML.load(m["content"]).each_with_object({}) { |(k, v), h| h[k.downcase] = v }
757
+ MDLess.meta = YAML.unsafe_load(m["content"]).each_with_object({}) { |(k, v), h| h[k.downcase] = v }
758
758
  rescue Psych::DisallowedClass => e
759
759
  @log.error("Error reading YAML header")
760
760
  @log.error(e)
data/lib/mdless/string.rb CHANGED
@@ -67,7 +67,7 @@ class ::String
67
67
  input.sub!(/(?i-m)^---[ \t]*\n(?<content>[\s\S]*?)\n[-.]{3}[ \t]*\n/m) do
68
68
  m = Regexp.last_match
69
69
  MDLess.log.info('Processing YAML Header')
70
- YAML.load(m['content']).map { |k, v| MDLess.meta[k.downcase] = v }
70
+ YAML.unsafe_load(m['content']).map { |k, v| MDLess.meta[k.downcase] = v }
71
71
  lines = m['content'].split(/\n/)
72
72
  longest = lines.inject { |memo, word| memo.length > word.length ? memo : word }.length
73
73
  longest = longest < @cols ? longest + 1 : @cols
@@ -159,6 +159,6 @@ class ::String
159
159
  def valid_lexer?
160
160
  return false unless TTY::Which.exist?('pygmentize')
161
161
 
162
- MDLess.pygments_lexers.include?(self.downcase)
162
+ MDLess.pygments_lexers.include?(downcase)
163
163
  end
164
164
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module CLIMarkdown
4
- VERSION = '2.1.48'
4
+ VERSION = '2.1.51'
5
5
  end
data/lib/mdless.rb CHANGED
@@ -1,25 +1,27 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'optparse'
4
- require 'shellwords'
5
- require 'open3'
6
3
  require 'fileutils'
7
4
  require 'logger'
8
- require 'tty-which'
5
+ require 'open3'
6
+ require 'optparse'
7
+ require 'shellwords'
8
+
9
+ require 'redcarpet'
10
+ require 'rouge'
9
11
  require 'tty-screen'
10
12
  require 'tty-spinner'
11
- require 'rouge'
12
- require 'mdless/version'
13
- require 'mdless/colors'
14
- require 'mdless/tables'
15
- require 'mdless/hash'
16
- require 'mdless/string'
17
- require 'mdless/array'
18
- require 'mdless/taskpaper'
19
- require 'mdless/theme'
20
- require 'redcarpet'
21
- require 'mdless/console'
22
- require 'mdless/converter'
13
+ require 'tty-which'
14
+
15
+ require_relative 'mdless/theme'
16
+ require_relative 'mdless/array'
17
+ require_relative 'mdless/colors'
18
+ require_relative 'mdless/converter'
19
+ require_relative 'mdless/hash'
20
+ require_relative 'mdless/string'
21
+ require_relative 'mdless/tables'
22
+ require_relative 'mdless/taskpaper'
23
+ require_relative 'mdless/version'
24
+ require_relative 'mdless/console'
23
25
 
24
26
  module CLIMarkdown
25
27
  EXECUTABLE_NAME = 'mdless'
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: 2.1.48
4
+ version: 2.1.51
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brett Terpstra
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-09-30 00:00:00.000000000 Z
11
+ date: 2024-12-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: redcarpet
@@ -25,19 +25,19 @@ dependencies:
25
25
  - !ruby/object:Gem::Version
26
26
  version: '3.6'
27
27
  - !ruby/object:Gem::Dependency
28
- name: tty-which
28
+ name: rouge
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '0.5'
33
+ version: '4.2'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '0.5'
40
+ version: '4.2'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: tty-screen
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -67,19 +67,19 @@ dependencies:
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0.8'
69
69
  - !ruby/object:Gem::Dependency
70
- name: rouge
70
+ name: tty-which
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '4.2'
75
+ version: '0.5'
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: '4.2'
82
+ version: '0.5'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: rake
85
85
  requirement: !ruby/object:Gem::Requirement
@@ -100,14 +100,28 @@ dependencies:
100
100
  requirements:
101
101
  - - ">="
102
102
  - !ruby/object:Gem::Version
103
- version: 6.3.1
103
+ version: 6.6.2
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - ">="
109
109
  - !ruby/object:Gem::Version
110
- version: 6.3.1
110
+ version: 6.6.2
111
+ - !ruby/object:Gem::Dependency
112
+ name: rubocop
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - "~>"
116
+ - !ruby/object:Gem::Version
117
+ version: '0.49'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - "~>"
123
+ - !ruby/object:Gem::Version
124
+ version: '0.49'
111
125
  description: A CLI that provides a formatted and highlighted view of Markdown files
112
126
  in a terminal
113
127
  email: me@brettterpstra.com
@@ -158,7 +172,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
158
172
  - !ruby/object:Gem::Version
159
173
  version: '0'
160
174
  requirements: []
161
- rubygems_version: 3.2.16
175
+ rubygems_version: 3.5.23
162
176
  signing_key:
163
177
  specification_version: 4
164
178
  summary: A pager like less, but for Markdown files