marked-conductor 1.0.18 → 1.0.19

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: 07cc317b99e30de42235572b6444e09b6a958b79bc2eda7fdb8fa9b88d608b3f
4
- data.tar.gz: 31b568475ab2a17c310d5279e8c356d10d4c8217ecb112a667edde4e6a6425a5
3
+ metadata.gz: b36eba533a0b58958b2a4a9cb9c1a4ec2e9d93a1f57fb91524fead2ef93f55a5
4
+ data.tar.gz: 37897dda228ea0b7f8e84c233fb5703c4ed2e9573fe412ae54b724f7d0c6ef4f
5
5
  SHA512:
6
- metadata.gz: cb5b28f08d4de3b9e2574564302f390d519dbeab569b84e08a6eac7f432053235a53bf6cf31f9742384eb978618b5cf73d24661f22fc1f9b91e1e18a4686d7eb
7
- data.tar.gz: 9067a2196bf46d104bc62a0152908a14cee90e1b7c27434a24452d85a2da20abcfd19499947e65503fdde7051e9e023a3c5829930e0451b28041c5fdf4d1713a
6
+ metadata.gz: 15a5ec6f5a56f5def420bddbd26c4c644f0ce37e3b32a430d13ba51d35957811f882778ce5f9cd396bde255607ef6697b6c07ce7b64a7a3191548f3302705a76
7
+ data.tar.gz: 73472bc3cb6add78f1566d79e7b5c032da312af0021fc7ccebb17523ba719ca1e7f65f5ab478d05a4e5f29782a62141c169c74136997085230be45c23f2f607f
data/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ### 1.0.19
2
+
3
+ 2024-07-02 11:25
4
+
5
+ #### FIXED
6
+
7
+ - Bug in creating default config
8
+
1
9
  ### 1.0.18
2
10
 
3
11
  2024-07-02 11:08
@@ -14,34 +14,34 @@ module Conductor
14
14
 
15
15
  @tracks = @config["tracks"].symbolize_keys
16
16
  end
17
- end
18
17
 
19
- def create_config(config_file)
20
- config_dir = File.dirname(config_file)
21
- scripts_dir = File.dirname(File.join(config_dir, "scripts"))
22
- FileUtils.mkdir_p(config_dir) unless File.directory?(config_dir)
23
- FileUtils.mkdir_p(scripts_dir) unless File.directory?(scripts_dir)
24
- File.open(config_file, "w") { |f| f.puts sample_config }
25
- puts "Sample config created at #{config_file}"
18
+ def create_config(config_file)
19
+ config_dir = File.dirname(config_file)
20
+ scripts_dir = File.dirname(File.join(config_dir, "scripts"))
21
+ FileUtils.mkdir_p(config_dir) unless File.directory?(config_dir)
22
+ FileUtils.mkdir_p(scripts_dir) unless File.directory?(scripts_dir)
23
+ File.open(config_file, "w") { |f| f.puts sample_config }
24
+ puts "Sample config created at #{config_file}"
26
25
 
27
- Process.exit 0
28
- end
26
+ Process.exit 0
27
+ end
29
28
 
30
- def sample_config
31
- <<~EOCONFIG
32
- tracks:
33
- - condition: phase is pre
34
- tracks:
35
- - condition: tree contains .obsidian
29
+ def sample_config
30
+ <<~EOCONFIG
31
+ tracks:
32
+ - condition: phase is pre
36
33
  tracks:
34
+ - condition: tree contains .obsidian
35
+ tracks:
36
+ - condition: extension is md
37
+ script: obsidian-md-filter
37
38
  - condition: extension is md
38
- script: obsidian-md-filter
39
- - condition: extension is md
40
- command: rdiscount $file
41
- - condition: yaml includes comments
42
- script: blog-processor
43
- - condition: any
44
- command: echo 'NOCUSTOM'
45
- EOCONFIG
39
+ command: rdiscount $file
40
+ - condition: yaml includes comments
41
+ script: blog-processor
42
+ - condition: any
43
+ command: echo 'NOCUSTOM'
44
+ EOCONFIG
45
+ end
46
46
  end
47
47
  end
@@ -172,10 +172,16 @@ class ::String
172
172
  %(#{self}\n<script type="javascript" src="#{path.strip}"></script>\n)
173
173
  end
174
174
 
175
+ def insert_raw_javascript(content)
176
+ %(#{self}\n<script>#{content}</script>)
177
+ end
178
+
175
179
  def insert_script(path)
176
180
  path.strip!
177
181
  return insert_javascript(path) if path =~ /^http/
178
182
 
183
+ return insert_raw_javascript(path) if path =~ /\(.*?\)/
184
+
179
185
  path.sub!(/(\.js)?$/, '.js')
180
186
 
181
187
  if path =~ %r{^[~/]}
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Conductor
4
- VERSION = '1.0.18'
4
+ VERSION = '1.0.19'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: marked-conductor
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.18
4
+ version: 1.0.19
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brett Terpstra