public void TestFallback_InclusionWithCodeFences() { // -root_folder (this is also docset folder) // |- root.md // |- a_folder // |- a.md // |- code_folder // |- sample1.cs // -fallback_folder // |- a_folder // |- code_in_a.cs // |- code_folder // |- sample2.cs // 1. Prepare data var root = @"markdown root.md main content start. mardown a content in root.md content start [!include[a](a_folder/a.md ""This is a.md"")] mardown a content in root.md content end sample 1 code in root.md content start [!CODE-cs[this is sample 1 code](code_folder/sample1.cs)] sample 1 code in root.md content end sample 2 code in root.md content start [!CODE-cs[this is sample 2 code](code_folder/sample2.cs)] sample 2 code in root.md content end markdown root.md main content end."; var a = @"markdown a.md main content start. code_in_a code in a.md content start [!CODE-cs[this is code_in_a code](code_in_a.cs)] code_in_a in a.md content end markdown a.md a.md content end."; var code_in_a = @"namespace code_in_a{}"; var sample1 = @"namespace sample1{}"; var sample2 = @"namespace sample2{}"; var uniqueFolderName = Path.GetRandomFileName(); TestUtility.WriteToFile($"{uniqueFolderName}/root_folder/root.md", root); TestUtility.WriteToFile($"{uniqueFolderName}/root_folder/a_folder/a.md", a); TestUtility.WriteToFile($"{uniqueFolderName}/root_folder/code_folder/sample1.cs", sample1); TestUtility.WriteToFile($"{uniqueFolderName}/fallback_folder/a_folder/code_in_a.cs", code_in_a); TestUtility.WriteToFile($"{uniqueFolderName}/fallback_folder/code_folder/sample2.cs", sample2); var fallbackFolders = new List <string> { { Path.Combine(Directory.GetCurrentDirectory(), $"{uniqueFolderName}/fallback_folder") } }; // Verify root.md markup result var parameter = new MarkdownServiceParameters { BasePath = "." }; var service = new MarkdigMarkdownService(parameter); //var rootMarked = service.Markup(Path.Combine(Directory.GetCurrentDirectory(), $"{uniqueFolderName}/root_folder"), root, fallbackFolders, "root.md"); var rootMarked = service.Markup("place", "holder"); var rootDependency = rootMarked.Dependency; Assert.Equal(@"<p>markdown root.md main content start.</p> <p>mardown a content in root.md content start</p> <p>markdown a.md main content start.</p> <p>code_in_a code in a.md content start</p> <pre><code class=""lang-cs"" name=""this is code_in_a code"">namespace code_in_a{} </code></pre><p>code_in_a in a.md content end</p> <p>markdown a.md a.md content end.</p> <p>mardown a content in root.md content end</p> <p>sample 1 code in root.md content start</p> <pre><code class=""lang-cs"" name=""this is sample 1 code"">namespace sample1{} </code></pre><p>sample 1 code in root.md content end</p> <p>sample 2 code in root.md content start</p> <pre><code class=""lang-cs"" name=""this is sample 2 code"">namespace sample2{} </code></pre><p>sample 2 code in root.md content end</p> <p>markdown root.md main content end.</p> ".Replace("\r\n", "\n"), rootMarked.Html); Assert.Equal( new[] { "../fallback_folder/a_folder/code_in_a.cs", "../fallback_folder/code_folder/sample2.cs", "a_folder/a.md", "a_folder/code_in_a.cs", "code_folder/sample1.cs", "code_folder/sample2.cs" }, rootDependency.OrderBy(x => x).ToArray()); // Verify a.md markup result //var aMarked = service.Markup(Path.Combine(Directory.GetCurrentDirectory(), $"{uniqueFolderName}/root_folder"), a, fallbackFolders, "a_folder/a.md"); var aMarked = service.Markup("place", "holder"); var aDependency = aMarked.Dependency; Assert.Equal(@"<p>markdown a.md main content start.</p> <p>code_in_a code in a.md content start</p> <pre><code class=""lang-cs"" name=""this is code_in_a code"">namespace code_in_a{} </code></pre><p>code_in_a in a.md content end</p> <p>markdown a.md a.md content end.</p> ".Replace("\r\n", "\n"), aMarked.Html); Assert.Equal( new[] { "../../fallback_folder/a_folder/code_in_a.cs", "code_in_a.cs" }, aDependency.OrderBy(x => x).ToArray()); }
public void TestDfmFencesInlineLevel() { var root = @" | Code in table | Header1 | ----------------- | ---------------------------- | [!code-FakeREST[REST](api.json)] | [!Code-FakeREST-i[REST-i](api.json ""This is root"")] | [!CODE[No Language](api.json)] | [!code-js[empty](api.json)] "; var apiJsonContent = @" { ""method"": ""GET"", ""resourceFormat"": ""https://outlook.office.com/api/v1.0/me/events?$select=Subject,Organizer,Start,End"", ""requestUrl"": ""https://outlook.office.com/api/v1.0/me/events?$select=Subject,Organizer,Start,End"", ""requestHeaders"": { ""Accept"": ""application/json"" } }"; const string expected = @"<table> <thead> <tr> <th>Code in table</th> <th>Header1</th> </tr> </thead> <tbody> <tr> <td><pre><code class=""lang-FakeREST"" name=""REST""> { "method": "GET", "resourceFormat": "https://outlook.office.com/api/v1.0/me/events?$select=Subject,Organizer,Start,End", "requestUrl": "https://outlook.office.com/api/v1.0/me/events?$select=Subject,Organizer,Start,End", "requestHeaders": { "Accept": "application/json" } } </code></pre></td> <td><pre><code class=""lang-FakeREST-i"" name=""REST-i"" title=""This is root""> { "method": "GET", "resourceFormat": "https://outlook.office.com/api/v1.0/me/events?$select=Subject,Organizer,Start,End", "requestUrl": "https://outlook.office.com/api/v1.0/me/events?$select=Subject,Organizer,Start,End", "requestHeaders": { "Accept": "application/json" } } </code></pre></td> </tr> <tr> <td><pre><code name=""No Language""> { "method": "GET", "resourceFormat": "https://outlook.office.com/api/v1.0/me/events?$select=Subject,Organizer,Start,End", "requestUrl": "https://outlook.office.com/api/v1.0/me/events?$select=Subject,Organizer,Start,End", "requestHeaders": { "Accept": "application/json" } } </code></pre></td> <td><pre><code class=""lang-js"" name=""empty""> { "method": "GET", "resourceFormat": "https://outlook.office.com/api/v1.0/me/events?$select=Subject,Organizer,Start,End", "requestUrl": "https://outlook.office.com/api/v1.0/me/events?$select=Subject,Organizer,Start,End", "requestHeaders": { "Accept": "application/json" } } </code></pre></td> </tr> </tbody> </table> "; TestUtility.VerifyMarkup(root, expected, files: new Dictionary <string, string> { { "api.json", apiJsonContent }, }); }
public void TestBlockLevelInclusionWithSameFile() { // -r // |- r.md // |- a // | |- a.md // |- b // | |- token.md // |- c // |- d // |- d.md // |- img // | |- img.jpg var r = @" [!include[](a/a.md)] [!include[](c/d/d.md)] "; var a = @" [!include[](../b/token.md)]"; var token = @" ![](../img/img.jpg) [](#anchor) [a](../a/a.md) [](invalid.md) [d](../c/d/d.md#anchor) "; var d = @" [!include[](../../b/token.md)]"; TestUtility.WriteToFile("r/r.md", r); TestUtility.WriteToFile("r/a/a.md", a); TestUtility.WriteToFile("r/b/token.md", token); TestUtility.WriteToFile("r/c/d/d.md", d); var marked = TestUtility.MarkupWithoutSourceInfo(a, "r/a/a.md"); var expected = @"<p><img src=""%7E/r/img/img.jpg"" alt="""" /> <a href=""#anchor""></a> <a href=""%7E/r/a/a.md"">a</a> <a href=""%7E/r/b/invalid.md""></a> <a href=""%7E/r/c/d/d.md#anchor"">d</a></p>".Replace("\r\n", "\n") + "\n"; var dependency = marked.Dependency; Assert.Equal(expected, marked.Html); Assert.Equal( new[] { "../b/token.md" }, dependency.OrderBy(x => x).ToArray()); marked = TestUtility.MarkupWithoutSourceInfo(d, "r/c/d/d.md"); dependency = marked.Dependency; Assert.Equal(expected, marked.Html); Assert.Equal( new[] { "../../b/token.md" }, dependency.OrderBy(x => x).ToArray()); dependency.Clear(); marked = TestUtility.MarkupWithoutSourceInfo(r, "r/r.md"); dependency = marked.Dependency; Assert.Equal($@"{expected}{expected}", marked.Html); Assert.Equal( new[] { "a/a.md", "b/token.md", "c/d/d.md" }, dependency.OrderBy(x => x).ToArray()); }
public void TestFallback_Inclusion_random_name() { // -root_folder (this is also docset folder) // |- root.md // |- a_folder // | |- a.md // |- token_folder // | |- token1.md // -fallback_folder // |- token_folder // |- token2.md // 1. Prepare data var uniqueFolderName = Path.GetRandomFileName(); var root = $@"1markdown root.md main content start. [!include[a](a_folder_{uniqueFolderName}/a_{uniqueFolderName}.md ""This is a.md"")] markdown root.md main content end."; var a = $@"1markdown a.md main content start. [!include[token1](../token_folder_{uniqueFolderName}/token1_{uniqueFolderName}.md ""This is token1.md"")] [!include[token1](../token_folder_{uniqueFolderName}/token2_{uniqueFolderName}.md ""This is token2.md"")] markdown a.md main content end."; var token1 = $@"1markdown token1.md content start. [!include[token2](token2_{uniqueFolderName}.md ""This is token2.md"")] markdown token1.md content end."; var token2 = @"**1markdown token2.md main content**"; TestUtility.WriteToFile($"{uniqueFolderName}/root_folder_{uniqueFolderName}/root_{uniqueFolderName}.md", root); TestUtility.WriteToFile($"{uniqueFolderName}/root_folder_{uniqueFolderName}/a_folder_{uniqueFolderName}/a_{uniqueFolderName}.md", a); TestUtility.WriteToFile($"{uniqueFolderName}/root_folder_{uniqueFolderName}/token_folder_{uniqueFolderName}/token1_{uniqueFolderName}.md", token1); TestUtility.WriteToFile($"{uniqueFolderName}/fallback_folder_{uniqueFolderName}/token_folder_{uniqueFolderName}/token2_{uniqueFolderName}.md", token2); var fallbackFolders = new List <string> { { Path.Combine(Directory.GetCurrentDirectory(), $"{uniqueFolderName}/fallback_folder_{uniqueFolderName}") } }; var parameter = new MarkdownServiceParameters { BasePath = "." }; var service = new MarkdigMarkdownService(parameter); //var marked = service.Markup(Path.Combine(Directory.GetCurrentDirectory(), $"{uniqueFolderName}/root_folder_{uniqueFolderName}"), root, fallbackFolders, $"root_{uniqueFolderName}.md"); var marked = service.Markup("place", "holder"); var dependency = marked.Dependency; Assert.Equal($@"<p>1markdown root.md main content start.</p> <p>1markdown a.md main content start.</p> <p>1markdown token1.md content start.</p> <p><strong>1markdown token2.md main content</strong></p> <p>markdown token1.md content end.</p> <p><strong>1markdown token2.md main content</strong></p> <p>markdown a.md main content end.</p> <p>markdown root.md main content end.</p> ".Replace("\r\n", "\n"), marked.Html); Assert.Equal( new[] { $"../fallback_folder_{uniqueFolderName}/token_folder_{uniqueFolderName}/token2_{uniqueFolderName}.md", $"a_folder_{uniqueFolderName}/a_{uniqueFolderName}.md", $"token_folder_{uniqueFolderName}/token1_{uniqueFolderName}.md", $"token_folder_{uniqueFolderName}/token2_{uniqueFolderName}.md" }, dependency.OrderBy(x => x).ToArray()); }
public void CodeTestBlockGeneral(string source, string expected) { var filename = string.Empty; var content = string.Empty; // arrange if (source.Contains("source.cs")) { filename = "source.cs"; content = contentCSharp; } else if (source.Contains("source2.cs")) { filename = "source2.cs"; content = contentCharpRegion; } else if (source.Contains("asp.cshtml")) { filename = "asp.cshtml"; content = contentASPNet; } else if (source.Contains("source.vb")) { filename = "source.vb"; content = contentVB; } else if (source.Contains("source.cpp")) { filename = "source.cpp"; content = contentCPP; } else if (source.Contains("source.sql")) { filename = "source.sql"; content = contentSQL; } else if (source.Contains("source.py")) { filename = "source.py"; content = contentPython; } else if (source.Contains("source.bat")) { filename = "source.bat"; content = contentBatch; } else if (source.Contains("source.erl")) { filename = "source.erl"; content = contentErlang; } else if (source.Contains("source.lsp")) { filename = "source.lsp"; content = contentLisp; } // act // assert TestUtility.VerifyMarkup(source, expected, files: new Dictionary <string, string> { { filename, content } }); }
public void TestBlockLevelInclusion() { // -r // |- root.md // |- empty.md // |- a // | |- refc.md // |- b // | |- linkAndRefRoot.md // | |- a.md // | |- img // | | |- img.jpg // |- c // | |- c.md // |- link // |- link2.md // |- md // |- c.md var root = @" [!include[linkAndRefRoot](b/linkAndRefRoot.md)] [!include[refc](a/refc.md ""This is root"")] [!include[refc_using_cache](a/refc.md)] [!include[empty](empty.md)] [!include[external](http://microsoft.com/a.md)]"; var linkAndRefRoot = @" Paragraph1 [link](a.md) [!include-[link2](../link/link2.md)] ![Image](img/img.jpg) [!include-[root](../root.md)]"; var link2 = @"[link](md/c.md)"; var refc = @"[!include[c](../c/c.md ""This is root"")]"; var c = @"**Hello**"; TestUtility.WriteToFile("r/root.md", root); TestUtility.WriteToFile("r/a/refc.md", refc); TestUtility.WriteToFile("r/b/linkAndRefRoot.md", linkAndRefRoot); TestUtility.WriteToFile("r/link/link2.md", link2); TestUtility.WriteToFile("r/c/c.md", c); TestUtility.WriteToFile("r/empty.md", string.Empty); var marked = TestUtility.MarkupWithoutSourceInfo(root, "r/root.md"); var dependency = marked.Dependency; var expected = @"<p>Paragraph1 <a href=""%7E/r/b/a.md"">link</a> <a href=""%7E/r/link/md/c.md"">link</a> <img src=""%7E/r/b/img/img.jpg"" alt=""Image"" /> [!include[root](../root.md)]</p> <p><strong>Hello</strong></p> <p><strong>Hello</strong></p> [!include[external](http://microsoft.com/a.md)]".Replace("\r\n", "\n"); Assert.Equal(expected, marked.Html); Assert.Equal( new[] { "a/refc.md", "b/linkAndRefRoot.md", "c/c.md", "empty.md", "link/link2.md", "root.md", }, dependency.OrderBy(x => x).ToArray()); }
private static void TestMarkupInGeneral(string source, string expected) { TestUtility.VerifyMarkup(source, expected, lineNumber: true, filePath: "Topic.md"); }
private void TestMarkup(string source, string expected) { var marked = TestUtility.MarkupWithoutSourceInfo(source, "Topic.md"); Assert.Equal(expected.Replace("\r\n", "\n"), marked.Html); }
public void KitchenSink() { //arange var content = @"# Article 2 Shared content. ## Section 1 Shared content. ::: zone target=""chromeless"" ## Section for chromeless only Some chromeless-specific content here... ::: nested moniker zone is not allowed. So this line is in plain text. Inline ::: should not end moniker zone. ::: zone-end ## Section 2 Shared content. ::: zone pivot=""foo"" a pivot ::: zone-end ::: zone pivot="" foo,bar "" target=""docs"" a pivot with target ::: zone-end ::: zone target=""docs"" pivot=""csharp7-is-great"" hello ::: zone-end "; var marked = TestUtility.Markup(content, "fake.md"); // assert var expected = @"<h1 id=""article-2"" sourceFile=""fake.md"" sourceStartLineNumber=""1"">Article 2</h1> <p sourceFile=""fake.md"" sourceStartLineNumber=""3"">Shared content.</p> <h2 id=""section-1"" sourceFile=""fake.md"" sourceStartLineNumber=""5"">Section 1</h2> <p sourceFile=""fake.md"" sourceStartLineNumber=""7"">Shared content.</p> <div class=""zone has-target"" data-target=""chromeless"" sourceFile=""fake.md"" sourceStartLineNumber=""9""> <h2 id=""section-for-chromeless-only"" sourceFile=""fake.md"" sourceStartLineNumber=""10"">Section for chromeless only</h2> <p sourceFile=""fake.md"" sourceStartLineNumber=""12"">Some chromeless-specific content here...</p> <p sourceFile=""fake.md"" sourceStartLineNumber=""14"">::: nested moniker zone is not allowed. So this line is in plain text. Inline ::: should not end moniker zone.</p> </div> <h2 id=""section-2"" sourceFile=""fake.md"" sourceStartLineNumber=""19"">Section 2</h2> <p sourceFile=""fake.md"" sourceStartLineNumber=""21"">Shared content.</p> <div class=""zone has-pivot"" data-pivot=""foo"" sourceFile=""fake.md"" sourceStartLineNumber=""23""> <p sourceFile=""fake.md"" sourceStartLineNumber=""24"">a pivot</p> </div> <div class=""zone has-target has-pivot"" data-target=""docs"" data-pivot=""foo bar"" sourceFile=""fake.md"" sourceStartLineNumber=""27""> <p sourceFile=""fake.md"" sourceStartLineNumber=""28"">a pivot with target</p> </div> <div class=""zone has-target has-pivot"" data-target=""docs"" data-pivot=""csharp7-is-great"" sourceFile=""fake.md"" sourceStartLineNumber=""31""> <p sourceFile=""fake.md"" sourceStartLineNumber=""32"">hello</p> </div> ".Replace("\r\n", "\n"); Assert.Equal(expected.Replace("\r\n", "\n"), marked.Html); }
public void TestAllExtentsions() { string source = @"--- title: ""如何使用 Visual C++ 工具集报告问题 | Microsoft Docs"" ms.custom: ms.date: 11/04/2016 ms.reviewer: ms.suite: ms.technology: - cpp ms.tgt_pltfrm: ms.topic: article dev_langs: - C++ ms.assetid: ec24a49c-411d-47ce-aa4b-8398b6d3e8f6 caps.latest.revision: 8 author: corob-msft ms.author: corob manager: ghogen translation.priority.mt: - cs-cz - pl-pl - pt-br - tr-tr translationtype: Human Translation ms.sourcegitcommit: 5c6fbfc8699d7d66c40b0458972d8b6ef0dcc705 ms.openlocfilehash: 2ea129ac94cb1ddc7486ba69280dc0390896e088 --- ## Inclusion ### Block inclusion [!include[block](~/includes/blockIncludeFile.md)] ### Inline inclusion Token is [!include[TEXT](includes/testtoken.md)] ## Code Snippet [!code-cs[code](~/code/code.cs#1)] [!code-cs[code](~/code/code.cs)] [!code-cs[Main](~/code/code.cs?highlight=3-4&range=4-7,15-20 ""This includes the whole file with lines 3-4 highlighted"")] [test link](topic.md) [test link1](Topics/topic.md) <xref:Microsoft.Build.Tasks> @Microsoft.Build.Tasks @""Microsoft.Build.Tasks?text=Tasks"" [link_text](xref:Microsoft.Build.Tasks) <xref:Microsoft.Build.Tasks#Anchor_1> <xref href=""Microsoft.Build.Tasks?alt=ImmutableArray""/> <xref:""Microsoft.Build.Tasks?alt=ImmutableArray""> <a href=""xref:Microsoft.Build.Tasks?displayProperty=fullName""/> ## Note / Section / Video http://your.company.abc, abc ### Note Sample > [!NOTE] > note content > [!TIP] > tip content > [!WARNING] > warning content > [!IMPORTANT] > important content > [!CAUTION] > caution content ### Section Sample > [!div class=""op_single_selector""] > * [Google](https://www.google.com) > * [Bing](https://www.bing.com/) ### Video Sample > [!Video https://sec.ch9.ms/ch9/4393/7d7c7df7-3f15-4a65-a2f7-3e4d0bea4393/Episode208_mid.mp4] ## CommonMark sample - # Foo - Bar --- baz"; string blockIncludeFile = @"Hello World. [!code[Main](~/code/code.cs?range=2,4-7,9-20 ""Test in include file"")] Update without force build, while a.md include b.md and b.md updated."; string testtoken = @"terry & jack"; string code = @"// <snippet1> using System; public struct Temperature { private decimal temp; private DateTime tempDate; public Temperature(decimal temperature, DateTime dateAndTime) { this.temp = temperature; this.tempDate = dateAndTime; } public decimal Degrees { get { return this.temp; } } public DateTime Date { get { return this.tempDate; } } } // </snippet1> #region 2 csr #endregion"; if (!Directory.Exists("includes")) { Directory.CreateDirectory("includes"); } if (!Directory.Exists("code")) { Directory.CreateDirectory("code"); } File.WriteAllText("includes/blockIncludeFile.md", blockIncludeFile); File.WriteAllText("includes/testtoken.md", testtoken); File.WriteAllText("code/code.cs", code); string expected = @"<yamlheader start=""1"" end=""27"">title: "如何使用 Visual C++ 工具集报告问题 | Microsoft Docs" ms.custom: ms.date: 11/04/2016 ms.reviewer: ms.suite: ms.technology: - cpp ms.tgt_pltfrm: ms.topic: article dev_langs: - C++ ms.assetid: ec24a49c-411d-47ce-aa4b-8398b6d3e8f6 caps.latest.revision: 8 author: corob-msft ms.author: corob manager: ghogen translation.priority.mt: - cs-cz - pl-pl - pt-br - tr-tr translationtype: Human Translation ms.sourcegitcommit: 5c6fbfc8699d7d66c40b0458972d8b6ef0dcc705 ms.openlocfilehash: 2ea129ac94cb1ddc7486ba69280dc0390896e088 </yamlheader><h2 id=""inclusion"">Inclusion</h2> <h3 id=""block-inclusion"">Block inclusion</h3> <p>Hello World.</p> <pre><code name=""Main"" title=""Test in include file"">using System; public struct Temperature { private decimal temp; private DateTime tempDate; public Temperature(decimal temperature, DateTime dateAndTime) { this.temp = temperature; this.tempDate = dateAndTime; } public decimal Degrees { get { return this.temp; } } public DateTime Date { get { return this.tempDate; } } } </code></pre> <p>Update without force build, while a.md include b.md and b.md updated.</p> <h3 id=""inline-inclusion"">Inline inclusion</h3> <p>Token is terry & jack</p> <h2 id=""code-snippet"">Code Snippet</h2> <pre><code class=""lang-cs"" name=""code"">using System; public struct Temperature { private decimal temp; private DateTime tempDate; public Temperature(decimal temperature, DateTime dateAndTime) { this.temp = temperature; this.tempDate = dateAndTime; } public decimal Degrees { get { return this.temp; } } public DateTime Date { get { return this.tempDate; } } } </code></pre><pre><code class=""lang-cs"" name=""code"">// <snippet1> using System; public struct Temperature { private decimal temp; private DateTime tempDate; public Temperature(decimal temperature, DateTime dateAndTime) { this.temp = temperature; this.tempDate = dateAndTime; } public decimal Degrees { get { return this.temp; } } public DateTime Date { get { return this.tempDate; } } } // </snippet1> #region 2 csr #endregion </code></pre><pre><code class=""lang-cs"" name=""Main"" title=""This includes the whole file with lines 3-4 highlighted"" highlight-lines=""3-4"">public struct Temperature { private decimal temp; private DateTime tempDate; public decimal Degrees { get { return this.temp; } } public DateTime Date { get { return this.tempDate; } } } </code></pre> <p><a href=""topic.md"">test link</a></p> <p><a href=""Topics/topic.md"">test link1</a></p> <p><xref href=""Microsoft.Build.Tasks"" data-throw-if-not-resolved=""True""></xref></p> <p><xref href=""Microsoft.Build.Tasks"" data-throw-if-not-resolved=""False"" data-raw-source=""@Microsoft.Build.Tasks""></xref></p> <p><xref href=""Microsoft.Build.Tasks?text=Tasks"" data-throw-if-not-resolved=""False"" data-raw-source=""@"Microsoft.Build.Tasks?text=Tasks"""></xref></p> <p><a href=""xref:Microsoft.Build.Tasks"">link_text</a></p> <p><xref href=""Microsoft.Build.Tasks#Anchor_1"" data-throw-if-not-resolved=""True""></xref></p> <xref href=""Microsoft.Build.Tasks?alt=ImmutableArray""/> <p><xref href=""Microsoft.Build.Tasks?alt=ImmutableArray"" data-throw-if-not-resolved=""True""></xref></p> <a href=""xref:Microsoft.Build.Tasks?displayProperty=fullName""/> <h2 id=""note--section--video"">Note / Section / Video</h2> <p><a href=""http://your.company.abc"">http://your.company.abc</a>, abc</p> <h3 id=""note-sample"">Note Sample</h3> <div class=""NOTE""> <h5>NOTE</h5> <p>note content</p> </div> <div class=""TIP""> <h5>TIP</h5> <p>tip content</p> </div> <div class=""WARNING""> <h5>WARNING</h5> <p>warning content</p> </div> <div class=""IMPORTANT""> <h5>IMPORTANT</h5> <p>important content</p> </div> <div class=""CAUTION""> <h5>CAUTION</h5> <p>caution content</p> </div> <h3 id=""section-sample"">Section Sample</h3> <div class=""op_single_selector""> <ul> <li><a href=""https://www.google.com"">Google</a></li> <li><a href=""https://www.bing.com/"">Bing</a></li> </ul> </div> <h3 id=""video-sample"">Video Sample</h3> <div class=""embeddedvideo""><iframe src=""https://sec.ch9.ms/ch9/4393/7d7c7df7-3f15-4a65-a2f7-3e4d0bea4393/Episode208_mid.mp4"" frameborder=""0"" allowfullscreen=""true""></iframe></div> <h2 id=""commonmark-sample"">CommonMark sample</h2> <ul> <li><h1 id=""foo"">Foo</h1> </li> <li><h2 id=""bar"">Bar</h2> baz</li> </ul> "; TestUtility.AssertEqual(expected, source, str => TestUtility.MarkupWithoutSourceInfo(str)); }
public void TestDfmInGeneral(string source, string expected) { TestUtility.AssertEqual(expected, source, TestUtility.MarkupWithoutSourceInfo); }