File tree Expand file tree Collapse file tree 2 files changed +27
-2
lines changed
tests/Elastic.Markdown.Tests/Directives Expand file tree Collapse file tree 2 files changed +27
-2
lines changed Original file line number Diff line number Diff line change @@ -185,3 +185,29 @@ public void Render() => Html.Should().Contain("""
185185 </li>
186186 """ ) ;
187187}
188+
189+
190+ public class DirectiveInList ( ITestOutputHelper output ) : DirectiveTest < AdmonitionBlock > ( output ,
191+ """
192+ # heading
193+
194+ - List Item 1
195+ :::::{note}
196+ Hello, World!
197+ :::::
198+ """
199+ )
200+ {
201+ [ Fact ]
202+ public void Type ( ) => Block ! . Admonition . Should ( ) . Be ( "note" ) ;
203+
204+ [ Fact ]
205+ public void Render ( ) => Html . Should ( ) . Contain ( """
206+ <li> List Item 1
207+ <div class="admonition note">
208+ <p class="admonition-title">Note</p>
209+ Hello, World!
210+ </div>
211+ </li>
212+ """ ) ;
213+ }
Original file line number Diff line number Diff line change @@ -23,8 +23,7 @@ public override async Task InitializeAsync()
2323 {
2424 await base . InitializeAsync ( ) ;
2525 Block = Document
26- . Where ( block => block is TDirective )
27- . Cast < TDirective > ( )
26+ . Descendants < TDirective > ( )
2827 . FirstOrDefault ( ) ;
2928 }
3029
You can’t perform that action at this time.
0 commit comments