Skip to content

Commit

Permalink
chore: fix PlantUML failed test
Browse files Browse the repository at this point in the history
  • Loading branch information
filzrev committed Oct 1, 2024
1 parent f99e02c commit 77f5c87
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/Docfx.MarkdigEngine.Extensions.Tests/PlantUmlTest.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using System.Text.RegularExpressions;
using FluentAssertions;
using Xunit;

Expand All @@ -26,6 +27,10 @@ public void TestRenderSvg_SequenceDiagram()
}).TrimEnd();

result.Should().StartWith("""<div class="lang-plantUml"><svg""");

// Temporary workaround to remove <script> tags (See: https://github.com/plantuml/plantuml-server/issues/342)
result = Regex.Replace(result, @"<script(.+?)*</script>", "");

result.Should().EndWith("""hello</text><!--SRC=[SyfFKj2rKt3CoKnELR1Io4ZDoSa70000]--></g></svg></div>""");
}
}

0 comments on commit 77f5c87

Please sign in to comment.