markdown_exec 1.8.1 → 1.8.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d8aaff8a595c31c7795c427ecc803b27ef40ae65d54be8bac9df13350c51f2fd
4
- data.tar.gz: f65aee00b1f8567e7006ab73b4a60fb7a2e340fc6e4cfec33bd357051ab3a175
3
+ metadata.gz: c5acb96c20743bda8d745d4dece7997ff6cd5b5474fdeba4b7401474c7500528
4
+ data.tar.gz: 8e52cb02c35801816c9472c94112b521b110a758f602fdf0b19c4dd851c23243
5
5
  SHA512:
6
- metadata.gz: fbc6f2c928ba9a6e7a02783ff5f958df4daa8e7841b25c6482e1fb886d54b784bc9770c249eb38db1829b17bff4cea15b3a95dd4480aab1aab172595de7ee8e8
7
- data.tar.gz: dbca510e5135474f9ab1ed200046469dc06781a6c051559b07dad381dbaba11e5e4e71a95fe500a69c8373fe7676ae7c4650ad339cc644bd29fdafb2aa02187c
6
+ metadata.gz: bb66529f2a2766cb1f8cbdd8b071c02eb29ef0c55e29507576a3cb9a0fc4920093fb03af95ddd480a8f6a189d3a86c4b504315f2faadba173a345d07fd16de8e
7
+ data.tar.gz: 19af41e603d32a7acc84151ac4db6e4ae4b746990289cb3c89bf8e436a5bf1c98b2e73814f94b4ee348f6a9bcb3fbce35d195c4588a10965bea9e88c0f486b53
data/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.8.4] - 2023-12-15
4
+
5
+ ### Added
6
+
7
+ - Options to dump blocks when processed.
8
+
9
+ ### Changed
10
+
11
+ - Refactor code generation for and after Link blocks
12
+
13
+ ## [1.8.2] - 2023-12-12
14
+
15
+ ### Changed
16
+
17
+ - Set default colors.
18
+
3
19
  ## [1.8.1] - 2023-12-11
4
20
 
5
21
  ### Changed
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- markdown_exec (1.8.1)
4
+ markdown_exec (1.8.4)
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.1"
16
+ echo "1.8.4"
17
17
  }
18
18
 
19
19
  _mde() {
@@ -36,6 +36,12 @@ _mde() {
36
36
 
37
37
  -d) COMPREPLY="0"; return 0 ;;
38
38
 
39
+ --dump-blocks-in-file) COMPREPLY="0"; return 0 ;;
40
+
41
+ --dump-menu-blocks) COMPREPLY="0"; return 0 ;;
42
+
43
+ --dump-selected-block) COMPREPLY="0"; return 0 ;;
44
+
39
45
  --filename) COMPREPLY="."; return 0 ;;
40
46
 
41
47
  -f) COMPREPLY="."; return 0 ;;
@@ -82,7 +88,7 @@ _mde() {
82
88
  # present matching option names
83
89
  #
84
90
  if [[ ${cur} == -* ]] ; then
85
- opts=("--block-name" "--config" "--debug" "--exit" "--filename" "--find" "--help" "--how" "--list-blocks" "--list-count" "--list-default-env" "--list-default-yaml" "--list-docs" "--list-recent-output" "--list-recent-scripts" "--output-execution-summary" "--output-script" "--output-stdout" "--path" "--pwd" "--run-last-script" "--save-executed-script" "--save-execution-output" "--saved-script-folder" "--saved-stdout-folder" "--select-recent-output" "--select-recent-script" "--tab-completions" "--user-must-approve" "--version" "--display-level")
91
+ opts=("--block-name" "--config" "--debug" "--dump-blocks-in-file" "--dump-menu-blocks" "--dump-selected-block" "--exit" "--filename" "--find" "--help" "--how" "--list-blocks" "--list-count" "--list-default-env" "--list-default-yaml" "--list-docs" "--list-recent-output" "--list-recent-scripts" "--output-execution-summary" "--output-script" "--output-stdout" "--path" "--pwd" "--run-last-script" "--save-executed-script" "--save-execution-output" "--saved-script-folder" "--saved-stdout-folder" "--select-recent-output" "--select-recent-script" "--tab-completions" "--user-must-approve" "--version" "--display-level")
86
92
  COMPREPLY=( $(compgen -W "$(printf "'%s' " "${opts[@]}")" -- "${cur}") )
87
93
 
88
94
  return 0
@@ -105,6 +111,12 @@ _mde() {
105
111
 
106
112
  -d) COMPREPLY=".BOOL."; return 0 ;;
107
113
 
114
+ --dump-blocks-in-file) COMPREPLY=".BOOL."; return 0 ;;
115
+
116
+ --dump-menu-blocks) COMPREPLY=".BOOL."; return 0 ;;
117
+
118
+ --dump-selected-block) COMPREPLY=".BOOL."; return 0 ;;
119
+
108
120
  --filename) COMPREPLY=".RELATIVE_PATH."; return 0 ;;
109
121
 
110
122
  -f) COMPREPLY=".RELATIVE_PATH."; return 0 ;;
@@ -154,4 +166,4 @@ _mde() {
154
166
 
155
167
  complete -o filenames -o nospace -F _mde mde
156
168
  # _mde_echo_version
157
- # echo "Updated: 2023-12-12 00:15:14 UTC"
169
+ # echo "Updated: 2023-12-16 00:15:53 UTC"
data/examples/colors.md CHANGED
@@ -2,28 +2,44 @@
2
2
 
3
3
  ::: These Opts blocks set the color for all elements.
4
4
 
5
+ <https://en.wikipedia.org/wiki/Complementary_colors#/media/File:RGB_color_wheel.svg>
6
+
7
+ ff0000 red - exception text
8
+ ff7f00 orange - warning text
9
+ ffff00 yellow - notification text
10
+ 7fff00 chartreuse green - output frame
11
+ 00ff00 green - prompt
12
+ 00ff7f spring green - input frame
13
+ 00ffff cyan - menu text
14
+ 007fff azure - menu frame
15
+ 0000ff blue
16
+ 7f00ff violet - opts frame
17
+ ff00ff magenta - opts text
18
+ ff007f rose - exception frame
19
+
5
20
  ```opts :(document_options)
6
21
  ```
7
- ```opts :(default)
8
- exception_color_detail: fg_rgbh_E0_E0_20 # Color of exception detail
9
- exception_color_name: fg_rgbh_E0_20_20 # Color of exception name
10
- execution_report_preview_frame_color: fg_rgbh_20_80_80 # execution_report_preview_frame_color
11
- menu_bash_color: fg_rgbh_40_C0_F0 # Color of menu bash
12
- menu_chrome_color: fg_rgbh_80_80_20 # Color of menu chrome
13
- menu_divider_color: fg_rgbh_20_98_80 # Color of menu divider
14
- menu_link_color: fg_rgbh_20_E0_20 # Color of menu link
15
- menu_note_color: fg_rgbh_40_A0_A0 # Color of menu note
16
- menu_opts_color: fg_rgbh_E0_60_E0 # Color of menu opts
17
- menu_opts_set_color: fg_rgbh_E0_20_20 # Color of menu opts
18
- menu_task_color: fg_rgbh_A0_20_D0 # Color of menu task
19
- menu_vars_color: fg_rgbh_E0_80_20 # Color of menu vars
20
- menu_vars_set_color: fg_rgbh_E0_80_20 # Color of menu vars
21
- output_execution_label_name_color: fg_rgbh_20_D8_80 # Color of output_execution_label_name
22
- output_execution_label_value_color: fg_rgbh_20_E0_80 # Color of output_execution_label_value
23
- prompt_color_after_script_execution: fg_rgbh_20_E8_80 # Color of prompt after script execution
24
- script_execution_frame_color: fg_rgbh_20_80_80 # script_execution_frame_color
25
- script_preview_frame_color: fg_rgbh_20_80_80 # Color of output divider
26
- warning_color: fg_rgbh_E0_E0_20 # Color of warning message
22
+
23
+ ```opts :load_colors
24
+ exception_color_detail: fg_rgbh_ff_00_7f
25
+ exception_color_name: fg_rgbh_ff_00_00
26
+ execution_report_preview_frame_color: fg_rgbh_7f_ff_00
27
+ menu_bash_color: fg_rgbh_00_c0_c0
28
+ menu_chrome_color: fg_rgbh_40_c0_c0
29
+ menu_divider_color: fg_rgbh_80_d0_c0
30
+ menu_link_color: fg_rgbh_e0_e0_20
31
+ menu_note_color: fg_rgbh_b0_b0_b0
32
+ menu_opts_color: fg_rgbh_ff_00_ff
33
+ menu_opts_set_color: fg_rgbh_7f_00_ff
34
+ menu_task_color: fg_rgbh_ff_ff_ff
35
+ menu_vars_color: fg_rgbh_ff_a0_ff
36
+ menu_vars_set_color: fg_rgbh_00_ff_ff
37
+ output_execution_label_name_color: fg_rgbh_00_ff_00
38
+ output_execution_label_value_color: fg_rgbh_00_ff_00
39
+ prompt_color_after_script_execution: fg_rgbh_00_ff_00
40
+ script_execution_frame_color: fg_rgbh_00_ff_7f
41
+ script_preview_frame_color: fg_rgbh_7f_ff_00
42
+ warning_color: fg_rgbh_ff_7f_00
27
43
  ```
28
44
 
29
45
  ::: Example blocks
@@ -39,6 +55,7 @@ warning_color: fg_rgbh_E0_E0_20 # Color of warning mess
39
55
  ```vars :Vars1
40
56
  ```
41
57
  [ ] Task1
58
+
42
59
  blue; fg_rgbh_00_00_FF
43
60
  green; fg_rgbh_00_FF_00
44
61
  indigo; fg_rgbh_4B_00_82
data/examples/linked1.md CHANGED
@@ -15,7 +15,7 @@ colorize_env_vars 'vars for page3' PAGE3_VAR_VIA_INHERIT page3_var_via_environme
15
15
  PAGE2_VAR_VIA_INHERIT=for_page2_from_page1_via_inherited_code_file
16
16
  ```
17
17
 
18
- ```link :(linked2)
18
+ ```link :(linked2) +(vars2)
19
19
  file: examples/linked2.md
20
20
  ```
21
21
 
data/examples/linked2.md CHANGED
@@ -20,6 +20,10 @@ colorize_env_vars 'vars for page3' PAGE3_VAR_VIA_INHERIT page3_var_via_environme
20
20
  PAGE3_VAR_VIA_INHERIT=for_page3_from_page2_via_inherited_code_file
21
21
  ```
22
22
 
23
+ ```link :(linked3) +(vars3)
24
+ file: examples/linked3.md
25
+ ```
26
+
23
27
  ```link :linked3_import_vars +(vars3)
24
28
  file: examples/linked3.md
25
29
  block: show_vars
@@ -145,9 +145,6 @@ class AnsiFormatter
145
145
  results
146
146
  end
147
147
 
148
- # # Example usage
149
- # scan_and_process_string("Hello world, hello universe", "hello", :plain, :color)
150
-
151
148
  # Applies a color method to a string based on the provided color symbol.
152
149
  # The color method is fetched from @options and applied to the string.
153
150
  # @param string [String] The string to which the color will be applied.
data/lib/constants.rb CHANGED
@@ -14,7 +14,7 @@ class LoadFile
14
14
  Reuse = false
15
15
  end
16
16
 
17
- LoadFileNextBlock = Struct.new(:load_file, :next_block)
17
+ LoadFileLinkState = Struct.new(:load_file, :link_state)
18
18
 
19
19
  class MenuControl
20
20
  Fresh = false