markdown_exec 2.7.1 → 2.7.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/lib/filter.rb CHANGED
@@ -136,14 +136,14 @@ module MarkdownExec
136
136
  if options[:hide_blocks_by_name]
137
137
  filters[:hidden_name] =
138
138
  !!(options[:block_name_hidden_match].present? &&
139
- name =~ Regexp.new(options[:block_name_hidden_match]))
139
+ fcb.code_name_exp?(options[:block_name_hidden_match]))
140
140
  end
141
141
  filters[:include_name] =
142
142
  !!(options[:block_name_include_match].present? &&
143
- name =~ Regexp.new(options[:block_name_include_match]))
143
+ fcb.code_name_exp?(options[:block_name_include_match]))
144
144
  filters[:wrap_name] =
145
145
  !!(options[:block_name_wrapper_match].present? &&
146
- name =~ Regexp.new(options[:block_name_wrapper_match]))
146
+ fcb.code_name_exp?(options[:block_name_wrapper_match]))
147
147
  end
148
148
 
149
149
  # Evaluates the filter settings to make a final decision on
@@ -227,27 +227,6 @@ if $PROGRAM_NAME == __FILE__
227
227
  require_relative 'constants'
228
228
 
229
229
  module MarkdownExec
230
- # Define a mock fenced code block class for testing purposes
231
- class FCB
232
- attr_accessor :chrome, :disabled, :oname, :shell, :start_line, :type
233
-
234
- def initialize(
235
- chrome: false, dname: nil, oname: nil,
236
- shell: '', start_line: nil, type: nil
237
- )
238
- @chrome = chrome
239
- @dname = dname
240
- @oname = oname
241
- @shell = shell
242
- @type = type
243
- @start_line = start_line
244
- end
245
-
246
- def fetch(key, default)
247
- instance_variable_get("@#{key}") || default
248
- end
249
- end
250
-
251
230
  class FilterTest < Minitest::Test
252
231
  def setup
253
232
  @options = {}
data/lib/format_table.rb CHANGED
@@ -188,7 +188,6 @@ end
188
188
  return if $PROGRAM_NAME != __FILE__
189
189
 
190
190
  require 'minitest/autorun'
191
- require_relative 'colorize'
192
191
 
193
192
  class TestMarkdownTableFormatter < Minitest::Test
194
193
  def setup