Skip to content

Commit

Permalink
Remove output formatters
Browse files Browse the repository at this point in the history
  • Loading branch information
cjlotz committed Jan 2, 2024
1 parent c68fbc0 commit e7e134e
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 101 deletions.
41 changes: 0 additions & 41 deletions src/Docfx.MarkdigEngine.Extensions/PlantUml/FormatterFactory.cs

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
using static System.Text.Encoding;

using Markdig.Renderers;
using Markdig.Syntax;
using Markdig.Renderers.Html;
Expand Down Expand Up @@ -71,13 +73,16 @@ private static string FormatOutput(OutputFormat format, byte[] output)
switch (format)
{
case OutputFormat.Svg:
return new SvgOutputFormatter().FormatOutput(output);
string svg = UTF8.GetString(output);
return $"<div class=\"lang-plantUml\">{svg}</div>";

case OutputFormat.Ascii:
return new AsciiOutputFormatter().FormatOutput(output);
string ascii = ASCII.GetString(output);
return $"<div class=\"lang-plantUml\"><pre>{ascii}</pre></div>";

case OutputFormat.Ascii_Unicode:
return new AsciiUnicodeOutputFormatter().FormatOutput(output);
string asciiUnicode = UTF8.GetString(output);
return $"<div class=\"lang-plantUml\"><pre>{asciiUnicode}</pre></div>";

case OutputFormat.Png:
case OutputFormat.Eps:
Expand Down

0 comments on commit e7e134e

Please sign in to comment.