From 1da9f186d578f13ec733994b29e3c72dea65700e Mon Sep 17 00:00:00 2001 From: Steven Cohnd Date: Fri, 1 Nov 2024 13:11:34 -0400 Subject: [PATCH] colorize mermaid as plantuml --- OneMore/Commands/Images/DiagramCommand.cs | 27 ++++------------------- 1 file changed, 4 insertions(+), 23 deletions(-) diff --git a/OneMore/Commands/Images/DiagramCommand.cs b/OneMore/Commands/Images/DiagramCommand.cs index 1537076257..af83e92b40 100644 --- a/OneMore/Commands/Images/DiagramCommand.cs +++ b/OneMore/Commands/Images/DiagramCommand.cs @@ -4,21 +4,6 @@ namespace River.OneMoreAddIn.Commands { - using River.OneMoreAddIn.Models; - using River.OneMoreAddIn.Settings; - using River.OneMoreAddIn.UI; - using System; - using System.Collections.Generic; - using System.Drawing; - using System.IO; - using System.Linq; - using System.Text; - using System.Text.RegularExpressions; - using System.Threading; - using System.Threading.Tasks; - using System.Web; - using System.Windows.Forms; - using System.Xml.Linq; using Resx = Properties.Resources; @@ -197,10 +182,8 @@ public override async Task Execute(params object[] args) if (collapse) { - if (keyword == DiagramKeys.PlantUmlKey) - { - new ColorizeCommand(page, true).Colorize("plantuml", runs); - } + // for both plantuml and mermaid! TODO: Colorize Mermaid + new ColorizeCommand(page, true).Colorize("plantuml", runs); if (title != "PlantUML") { @@ -521,10 +504,8 @@ private async Task RefreshDiagram(string diagramID) size.SetAttributeValue("height", FormattableString.Invariant($"{bitmap.Height:0.0}")); } - if (keyword == DiagramKeys.PlantUmlKey) - { - new ColorizeCommand(page, true).Colorize("plantuml", runs); - } + // for both plantuml and mermaid! TODO: Colorize Mermaid + new ColorizeCommand(page, true).Colorize("plantuml", runs); await one.Update(page);