File tree Expand file tree Collapse file tree 2 files changed +19
-20
lines changed
tests/Elastic.Markdown.Tests/CodeBlocks Expand file tree Collapse file tree 2 files changed +19
-20
lines changed Original file line number Diff line number Diff line change @@ -118,21 +118,17 @@ public void ParsesMagicCallOuts() => Block!.CallOuts
118118
119119 [ Fact ]
120120 public void RendersExpectedHtml ( ) =>
121- Html . ReplaceLineEndings ( ) . Should ( ) . Contain ( """
122- <div class="highlight-csharp notranslate">
123- <div class="highlight">
124- <pre><code class="language-csharp">var x = 1;<span style="display: inline-block; width: 1ch"></span><span class="code-callout" data-index="1"></span>
125- var y = x - 2;
126- var z = y - 2;<span style="display: inline-block; width: 1ch"></span><span class="code-callout" data-index="2"></span>
127- </code></pre>
128- </div>
129- </div>
130- <p><strong>OUTPUT:</strong></p>
131- <ol class="code-callouts">
132- <li>Marking the first callout</li>
133- <li>Marking the second callout</li>
134- </ol>
135- """ . ReplaceLineEndings ( ) ) ;
121+
122+ Html . ReplaceLineEndings ( )
123+ . Should ( ) . Contain (
124+ // language=html
125+ """
126+ <p><strong>OUTPUT:</strong></p>
127+ <ol class="code-callouts">
128+ <li>Marking the first callout</li>
129+ <li>Marking the second callout</li>
130+ </ol>
131+ """ . ReplaceLineEndings ( ) ) ;
136132
137133
138134 [ Fact ]
Original file line number Diff line number Diff line change 11// Licensed to Elasticsearch B.V under one or more agreements.
22// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
33// See the LICENSE file in the project root for more information
4+
5+ using Elastic . Markdown . Myst . CodeBlocks ;
46using Elastic . Markdown . Myst . Directives ;
7+ using Elastic . Markdown . Tests . Inline ;
58using FluentAssertions ;
69
7- namespace Elastic . Markdown . Tests . Directives ;
10+ namespace Elastic . Markdown . Tests . CodeBlocks ;
811
9- public class MermaidBlockTests ( ITestOutputHelper output ) : DirectiveTest < UnsupportedDirectiveBlock > ( output ,
12+ public class MermaidBlockTests ( ITestOutputHelper output ) : BlockTest < EnhancedCodeBlock > ( output ,
1013"""
11- :::{ mermaid} as
14+ ``` mermaid
1215flowchart LR
1316 A[Jupyter Notebook] --> C
1417 B[MyST Markdown] --> C
@@ -19,14 +22,14 @@ B[MyST Markdown] --> C
1922 D --> H[React]
2023 D --> I[HTML]
2124 D <--> J[JATS]
22- :::
25+ ```
2326"""
2427)
2528{
2629 [ Fact ]
2730 public void ParsesBlock ( ) => Block . Should ( ) . NotBeNull ( ) ;
2831
29- // should still attempt to render contents as markdown
32+ // should still attempt to render contents as Markdown
3033 [ Fact ]
3134 public void IncludesRawFlowChart ( ) =>
3235 Html . Should ( ) . Contain ( "D --> I[HTML]" ) ;
You can’t perform that action at this time.
0 commit comments