markdown_exec 1.8.6 → 1.8.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.pryrc +0 -1
- data/.rubocop.yml +0 -2
- data/CHANGELOG.md +14 -2
- data/Gemfile.lock +1 -1
- data/bin/tab_completion.sh +2 -2
- data/examples/opts.md +2 -0
- data/lib/ansi_formatter.rb +1 -5
- data/lib/filter.rb +15 -3
- data/lib/hash_delegator.rb +440 -494
- data/lib/markdown_exec/version.rb +1 -1
- data/lib/mdoc.rb +33 -12
- data/lib/menu.src.yml +72 -4
- data/lib/menu.yml +62 -5
- data/lib/regexp_replacer.rb +14 -14
- data/lib/saved_assets.rb +10 -8
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 83a04f06ad7f74d2557e1967ae424a8b5f8b08e9ddbbad10091ab6612f94c106
|
4
|
+
data.tar.gz: 54a9b79333781bb540ce1e37f686bf132d437c2ab5475c6cd64c40b3f821935e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4106f3dc27781398aee563bba15355b05f67a118170da36e9c1c51b776ec7549576ee162b090a33a3da278694438a66746d2f4c31384315929eca57558c5ca7a
|
7
|
+
data.tar.gz: d46fa757bcfbee2fbfdebee46050ff579d4cd050a3203c887db47a5de4cc275986308cd056ef264947f1d7f239b717a8617b2a51218594f85cd10b27d14156bf
|
data/.pryrc
CHANGED
data/.rubocop.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,14 +1,26 @@
|
|
1
|
+
## [1.8.7] - 2023-12-31
|
2
|
+
|
1
3
|
# Changelog
|
2
4
|
|
5
|
+
### Added
|
6
|
+
|
7
|
+
- Option for block name that presents the menu.
|
8
|
+
- Options for decorating inherited lines in the menu.
|
9
|
+
- Options for parse and display of heading levels 1, 2, and 3.
|
10
|
+
|
11
|
+
### Changed
|
12
|
+
|
13
|
+
- Bypass chrome blocks when collecting dependencies.
|
14
|
+
|
3
15
|
## [1.8.6] - 2023-12-25
|
4
16
|
|
5
17
|
### Added
|
6
18
|
|
7
|
-
- Default path for find command
|
19
|
+
- Default path for find command.
|
8
20
|
|
9
21
|
### Changed
|
10
22
|
|
11
|
-
- Refactor command-line processing
|
23
|
+
- Refactor command-line processing.
|
12
24
|
|
13
25
|
## [1.8.5] - 2023-12-22
|
14
26
|
|
data/Gemfile.lock
CHANGED
data/bin/tab_completion.sh
CHANGED
@@ -13,7 +13,7 @@ __filedirs_all()
|
|
13
13
|
}
|
14
14
|
|
15
15
|
_mde_echo_version() {
|
16
|
-
echo "1.8.
|
16
|
+
echo "1.8.7"
|
17
17
|
}
|
18
18
|
|
19
19
|
_mde() {
|
@@ -178,4 +178,4 @@ _mde() {
|
|
178
178
|
|
179
179
|
complete -o filenames -o nospace -F _mde mde
|
180
180
|
# _mde_echo_version
|
181
|
-
# echo "Updated: 2023-12-
|
181
|
+
# echo "Updated: 2023-12-31 17:23:18 UTC"
|
data/examples/opts.md
CHANGED
data/lib/ansi_formatter.rb
CHANGED
@@ -21,11 +21,7 @@ class AnsiFormatter
|
|
21
21
|
(data&.map do |item|
|
22
22
|
scan_and_process_multiple_substrings(item, highlight, plain_color_sym,
|
23
23
|
highlight_color_sym).join
|
24
|
-
|
25
|
-
# string_send_color(item, color_sym)
|
26
|
-
end || []) #.join
|
27
|
-
# formatted_deps
|
28
|
-
# "#{line_prefix}#{string_send_color(label, highlight_color_sym)}#{line_postfix}\n" + formatted_deps.join("\n")
|
24
|
+
end || [])
|
29
25
|
end
|
30
26
|
|
31
27
|
# Function to scan a string and process its segments based on multiple substrings
|
data/lib/filter.rb
CHANGED
@@ -93,9 +93,7 @@ module MarkdownExec
|
|
93
93
|
!!(shell =~ /#{options[:select_by_shell_regex]}/)
|
94
94
|
end
|
95
95
|
|
96
|
-
unless shell.present? && options[:exclude_by_shell_regex].present?
|
97
|
-
return
|
98
|
-
end
|
96
|
+
return unless shell.present? && options[:exclude_by_shell_regex].present?
|
99
97
|
|
100
98
|
filters[:shell_exclude] =
|
101
99
|
!!(shell =~ /#{options[:exclude_by_shell_regex]}/)
|
@@ -178,6 +176,20 @@ module MarkdownExec
|
|
178
176
|
options[pattern].present? && fcb[:oname] =~ /#{options[pattern]}/
|
179
177
|
end
|
180
178
|
end
|
179
|
+
|
180
|
+
# Yields to the provided block with specified parameters if certain conditions are met.
|
181
|
+
# The method checks if a block is given, if the selected_messages include :blocks,
|
182
|
+
# and if the fcb_select? method returns true for the given fcb.
|
183
|
+
#
|
184
|
+
# @param fcb [Object] The object to be evaluated and potentially passed to the block.
|
185
|
+
# @param selected_messages [Array<Symbol>] A collection of message types, one of which must be :blocks.
|
186
|
+
# @param block [Block] A block to be called if conditions are met.
|
187
|
+
def self.yield_to_block_if_applicable(fcb, selected_messages, configuration = {}, &block)
|
188
|
+
if block_given? && selected_messages.include?(:blocks) &&
|
189
|
+
fcb_select?(configuration, fcb)
|
190
|
+
block.call :blocks, fcb
|
191
|
+
end
|
192
|
+
end
|
181
193
|
end
|
182
194
|
end
|
183
195
|
|