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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +33 -1
- data/Gemfile.lock +1 -1
- data/Rakefile +29 -11
- data/bats/block-type-opts.bats +23 -0
- data/bats/block-type-vars.bats +26 -0
- data/bats/block-types.bats +0 -36
- data/bats/border.bats +8 -0
- data/bats/document-shell.bats +9 -0
- data/bats/line-wrapping.bats +8 -0
- data/bin/tab_completion.sh +1 -1
- data/docs/dev/block-type-opts.md +4 -1
- data/docs/dev/block-type-vars.md +15 -4
- data/docs/dev/border.md +7 -0
- data/docs/dev/command-substitution.md +1 -0
- data/docs/dev/document-shell.md +6 -0
- data/docs/dev/line-wrapping.md +24 -0
- data/examples/link-blocks-vars.md +69 -41
- data/lib/colorize.rb +11 -37
- data/lib/fcb.rb +16 -4
- data/lib/filter.rb +3 -24
- data/lib/format_table.rb +0 -1
- data/lib/hash_delegator.rb +340 -173
- data/lib/input_sequencer.rb +7 -0
- data/lib/markdown_exec/version.rb +1 -1
- data/lib/markdown_exec.rb +1 -2
- data/lib/mdoc.rb +10 -13
- data/lib/menu.src.yml +8 -4
- data/lib/menu.yml +7 -3
- data/lib/ww.rb +4 -2
- metadata +11 -3
- /data/examples/{wrap.md → wrapped-blocks.md} +0 -0
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
|
-
|
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
|
-
|
143
|
+
fcb.code_name_exp?(options[:block_name_include_match]))
|
144
144
|
filters[:wrap_name] =
|
145
145
|
!!(options[:block_name_wrapper_match].present? &&
|
146
|
-
|
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 = {}
|