From 66007c6bbfe5b7dba404cdbb3998cc385c0ea04a Mon Sep 17 00:00:00 2001 From: Alexandre Mutel Date: Tue, 21 Nov 2017 07:34:44 +0100 Subject: [PATCH] Add TestLink example (#171) --- src/Markdig.Tests/TestPlayParser.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/Markdig.Tests/TestPlayParser.cs b/src/Markdig.Tests/TestPlayParser.cs index f62bceb1..1181f910 100644 --- a/src/Markdig.Tests/TestPlayParser.cs +++ b/src/Markdig.Tests/TestPlayParser.cs @@ -1,4 +1,4 @@ -// Copyright (c) Alexandre Mutel. All rights reserved. +// Copyright (c) Alexandre Mutel. All rights reserved. // This file is licensed under the BSD-Clause 2 license. // See the license.txt file in the project root for more information. using System; @@ -12,6 +12,14 @@ namespace Markdig.Tests [TestFixture] public class TestPlayParser { + [Test] + public void TestLink() + { + var doc = Markdown.Parse("There is a ![link](/yoyo)"); + var link = doc.Descendants().SelectMany(x => x.Inline.Descendants()).FirstOrDefault(l => l.IsImage); + Assert.AreEqual("/yoyo", link?.Url); + } + [Test] public void TestListBug2() {