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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 44e42ccdbdf5eed7e6ee36add8a5dcdcfe62d6cd3fb6fd531daf960c6ce7c9b7
4
- data.tar.gz: 753076d46e44f5d17698be53a0421212d8f2c804368f9737591dc92a7d5457d6
3
+ metadata.gz: 83a04f06ad7f74d2557e1967ae424a8b5f8b08e9ddbbad10091ab6612f94c106
4
+ data.tar.gz: 54a9b79333781bb540ce1e37f686bf132d437c2ab5475c6cd64c40b3f821935e
5
5
  SHA512:
6
- metadata.gz: 84d952fcfafed40a5e3949783760aec570448de48293fdae536b5386b95d8080d2c9c41f0149861686d2fd4985a59ebea6794e7953d7b4dc1185340d790e68a2
7
- data.tar.gz: 9db0c523154e32c3094046084594564c9114fbd2519f6ff5d9a8fcc5feb0d31b76dc3ccd1d6c4e2625507b81b4f70f9b6fdf31e250d132a5fdf2fa54d3cb8c77
6
+ metadata.gz: 4106f3dc27781398aee563bba15355b05f67a118170da36e9c1c51b776ec7549576ee162b090a33a3da278694438a66746d2f4c31384315929eca57558c5ca7a
7
+ data.tar.gz: d46fa757bcfbee2fbfdebee46050ff579d4cd050a3203c887db47a5de4cc275986308cd056ef264947f1d7f239b717a8617b2a51218594f85cd10b27d14156bf
data/.pryrc CHANGED
@@ -1,4 +1,3 @@
1
- binding.pry
2
1
  if defined?(PryByebug)
3
2
  Pry.config.pager = false
4
3
  Pry.commands.alias_command 'c', 'continue'
data/.rubocop.yml CHANGED
@@ -14,8 +14,6 @@ Layout/LineContinuationLeadingSpace:
14
14
  Enabled: false
15
15
 
16
16
  Layout/LineLength:
17
- # Max: 78
18
- # Max: 80
19
17
  Max: 96
20
18
 
21
19
  Lint/Debugger:
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
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- markdown_exec (1.8.6)
4
+ markdown_exec (1.8.7)
5
5
  clipboard (~> 1.3.6)
6
6
  open3 (~> 0.1.1)
7
7
  optparse (~> 0.1.1)
@@ -13,7 +13,7 @@ __filedirs_all()
13
13
  }
14
14
 
15
15
  _mde_echo_version() {
16
- echo "1.8.6"
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-26 00:07:49 UTC"
181
+ # echo "Updated: 2023-12-31 17:23:18 UTC"
data/examples/opts.md CHANGED
@@ -1,4 +1,6 @@
1
1
  # Demo configuring options
2
+ ## H2
3
+ ### H3
2
4
 
3
5
  ::: These Opts blocks set the color of a couple of menu options to demonstrate the live update of options.
4
6
 
@@ -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
- # color_sym = highlight.include?(item) ? highlight_color_sym : c
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