From 63fd11cd46c5065972d4e388575a2eb14b49b2b7 Mon Sep 17 00:00:00 2001 From: chrisfarms Date: Tue, 5 May 2020 14:37:41 +0100 Subject: [PATCH] use neutral theme for diagrams the deafult mermaid themes for diagrams don't quite fit the GOV.UK "brand" colors, and creating the CSS to get the colors pretty is out of scope, so this just sets it to use the "neutral" (grayscale) theme, which at least doesn't clash with anything. --- lib/govuk_tech_docs/tech_docs_html_renderer.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/govuk_tech_docs/tech_docs_html_renderer.rb b/lib/govuk_tech_docs/tech_docs_html_renderer.rb index 1e9bbe52..0b15dc29 100644 --- a/lib/govuk_tech_docs/tech_docs_html_renderer.rb +++ b/lib/govuk_tech_docs/tech_docs_html_renderer.rb @@ -47,7 +47,7 @@ def block_diagram(code) input_path = "#{tmp}/input" output_path = "#{tmp}/output.svg" File.open(input_path, "w") { |f| f.write(code) } - ok = exec_with_timeout("#{mmdc} -i #{input_path} -o #{output_path}", 2) + ok = exec_with_timeout("#{mmdc} -i #{input_path} -o #{output_path} --theme neutral", 2) if ok && File.exist?(output_path) File.read(output_path) else