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 +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/mdless/console.rb +1 -1
- data/lib/mdless/string.rb +2 -2
- data/lib/mdless/version.rb +1 -1
- data/lib/mdless.rb +18 -16
- metadata +25 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 96835ec2d65e265d4738a18b66a13fbd05a1616ee495291a0fe56842f6c00a53
|
4
|
+
data.tar.gz: 1d80c562cc27aadeabfd48f8bd6241d3bd4f9463671c50d87ae91f8f3bc9d170
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 391a9ebf2b8148eeb1f975f52618c8022256da5e8106487f449459c75ebe1d28849c1b7705dbe78bb5d63465dcb2689b61da326cff22790caa3f931ed344fd8c
|
7
|
+
data.tar.gz: 507c2797294777788121dd4f25fadb3ffcb9ada779f970434d8989508424c0e773c0ec128479e359f30fb9cdc5bae84daddeb0e96bf4588bc6a48b1d291a2a1a
|
data/CHANGELOG.md
CHANGED
data/lib/mdless/console.rb
CHANGED
@@ -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.
|
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.
|
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?(
|
162
|
+
MDLess.pygments_lexers.include?(downcase)
|
163
163
|
end
|
164
164
|
end
|
data/lib/mdless/version.rb
CHANGED
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 '
|
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 '
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
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.
|
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-
|
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:
|
28
|
+
name: rouge
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
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: '
|
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:
|
70
|
+
name: tty-which
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: '
|
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: '
|
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.
|
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.
|
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.
|
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
|