Upstream xoofx/markdig state of the touched files before baa95a9ca3
This commit is contained in:
1 parent
cf9456728c
commit
40eebc0cd8
5 files changed
+89
-74
No files matched your search
@@ -21,29 +21,4 @@ public class TestAutoLinks
|
||||
|
||||
Assert.That(html, Is.EqualTo(expected).IgnoreWhiteSpace);
|
||||
}
|
||||
|
||||
// https://github.com/xoofx/markdig/issues/668
|
||||
// A heading's implicit "AutoLink" reference (registered by the AutoIdentifiers extension) must not
|
||||
// resolve when its label is nested inside another still-open link bracket, otherwise it silently
|
||||
// breaks the outer, explicitly authored link.
|
||||
[Test]
|
||||
public void TestAutoIdentifierHeadingLinkDoesNotHijackNestedLinkLabel()
|
||||
{
|
||||
var markdown = "# Testing Markdown\n\n" +
|
||||
"### Header\n\n" +
|
||||
"[Testing [Header]](https://www.bing.com)\n\n" +
|
||||
"[Testing [test]](https://www.google.com)\n";
|
||||
var expected = "<h1 id=\"testing-markdown\">Testing Markdown</h1>\n" +
|
||||
"<h3 id=\"header\">Header</h3>\n" +
|
||||
"<p><a href=\"https://www.bing.com\">Testing [Header]</a></p>\n" +
|
||||
"<p><a href=\"https://www.google.com\">Testing [test]</a></p>";
|
||||
|
||||
var pipeline = new MarkdownPipelineBuilder()
|
||||
.UseAutoLinks()
|
||||
.UseAutoIdentifiers()
|
||||
.Build();
|
||||
var html = Markdown.ToHtml(markdown, pipeline);
|
||||
|
||||
Assert.That(html, Is.EqualTo(expected).IgnoreWhiteSpace);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user