Пример #1
0
        public async Task RenderAsync_OverrideByBlockConfig()
        {
            // Arrange
            const string input    = "$math$";
            const string expected = "<p>$math$</p>";
            var          option   = new OptionsWrapper <MarkdigRendererOptions>(new MarkdigRendererOptions());
            var          renderer = new MarkdigRenderer(option);

            // Act
            var actual = await renderer.RenderAsync(input, "common");

            // Assert
            actual.Trim().Should().BeEquivalentTo(expected);
        }
Пример #2
0
        public async Task RenderAsync_RenderMarkdown()
        {
            // Arrange
            const string input    = "`code`";
            const string expected = "<p><code>code</code></p>";
            var          option   = new OptionsWrapper <MarkdigRendererOptions>(new MarkdigRendererOptions());
            var          renderer = new MarkdigRenderer(option);

            // Act
            var actual = await renderer.RenderAsync(input, string.Empty);

            // Assert
            actual.Trim().Should().BeEquivalentTo(expected);
        }