Skip to content

Commit c15f6f0

Browse files
committed
feat: Pass mermaid config when creating graph, if config path is set
1 parent c3bcd2b commit c15f6f0

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

lib/tasks/job.thor

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,13 @@ class Job < Thor
3131
File.open(mmd_path, "w") { |f| f << mermaid }
3232

3333
pdf_path = File.join(mmd_dir, "#{job}.pdf")
34-
`mmd-cli -i #{mmd_path} -o #{pdf_path} -f`
34+
35+
configpath = Kiba::Extend::ProjectConfig.mermaid_config_path
36+
if configpath
37+
`mmd-cli -i #{mmd_path} -o #{pdf_path} -f -c #{configpath}`
38+
else
39+
`mmd-cli -i #{mmd_path} -o #{pdf_path} -f`
40+
end
3541

3642
`open #{pdf_path}`
3743
exit(0)

0 commit comments

Comments
 (0)