This repository has been archived on 2023-02-02. You can view files and clone it, but cannot push or open issues or pull requests.
mfgames-markdown-cil/tests/MfGames.Markdown.Gemtext.Tests/QuoteTests.cs

38 lines
1,011 B
C#

using Markdig;
using Markdig.Extensions.SmartyPants;
using MfGames.Markdown.Gemtext.Extensions;
using Xunit;
namespace MfGames.Markdown.Gemtext.Tests
{
public class QuoteTests
{
[Fact]
public void NormalDouble()
{
string input = "Normal \"double\" quote.";
string expected = "Normal \"double\" quote.";
string actual = MarkdownGemtext.ToGemtext(input);
Assert.Equal(expected, actual);
}
[Fact]
public void SmartyDouble()
{
GemtextSmartyPantsExtension smartyPants =
new(new SmartyPantOptions());
string input = "Normal \"double\" quote.";
string expected = "Normal “double” quote.";
string actual = MarkdownGemtext.ToGemtext(
input,
new MarkdownPipelineBuilder()
.Use(smartyPants)
.Build());
Assert.Equal(expected, actual);
}
}
}