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)"); }
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)"); }
public void ConvertImageWithoutFigureOrAltText() { string test = "![](image.png)"; string converted = MarkdownImages.RemoveAltIfNoFigure(test); converted = MarkdownImages.FixFigures(test); converted.Should().Be("![](image.png)"); }
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)"); }
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)"); }
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)"); }