Ejemplo n.º 1
0
        public void ConvertImageWithFigureOnAnotherLineBold()
        {
            string test      = "![](image.png)\r\n**Figure: this is a caption**";
            string converted = MarkdownImages.RemoveAltIfNoFigure(test);

            converted = MarkdownImages.FixFigures(converted);

            converted.Should().Be("![this is a caption](image.png)");
        }
Ejemplo n.º 2
0
        public void ConvertImageWithFigureWithAltText()
        {
            string test      = "![image.png](image.png) Figure: this is a caption";
            string converted = MarkdownImages.RemoveAltIfNoFigure(test);

            converted = MarkdownImages.FixFigures(converted);

            converted.Should().Be("![this is a caption](image.png)");
        }
Ejemplo n.º 3
0
        public void ConvertImageWithoutFigureOrAltText()
        {
            string test      = "![](image.png)";
            string converted = MarkdownImages.RemoveAltIfNoFigure(test);

            converted = MarkdownImages.FixFigures(test);

            converted.Should().Be("![](image.png)");
        }
Ejemplo n.º 4
0
        public void ConvertImageWithLinkInFigure()
        {
            string test      = "![](image.png) Figure: this is a caption with a URL www.test.com";
            string converted = MarkdownImages.RemoveAltIfNoFigure(test);

            converted = MarkdownImages.FixFigures(converted);

            converted.Should().Be("![this is a caption with a URL www.test.com](image.png)");
        }
Ejemplo n.º 5
0
        public void ConvertImageWithLink()
        {
            string test      = "![](image.png)(www.test.com)";
            string converted = MarkdownImages.RemoveAltIfNoFigure(test);

            converted = MarkdownImages.FixFigures(converted);

            converted.Should().Be("![](image.png)(www.test.com)");
        }
Ejemplo n.º 6
0
        public void ConvertImageOkExample()
        {
            string test      = "![](image.png)\r\n**Figure: Ok example - this is a caption**";
            string converted = MarkdownImages.RemoveAltIfNoFigure(test);

            converted = MarkdownImages.FixFigures(converted);

            converted.Should().Be("[[okExample]]\r\n| ![this is a caption](image.png)");
        }