diff --git a/src/Elastic.Markdown/Myst/MarkdownParser.cs b/src/Elastic.Markdown/Myst/MarkdownParser.cs index e6ce64f69..3f6a956ea 100644 --- a/src/Elastic.Markdown/Myst/MarkdownParser.cs +++ b/src/Elastic.Markdown/Myst/MarkdownParser.cs @@ -51,6 +51,7 @@ public class MarkdownParser( .UseGridTables() .UsePipeTables() .UseDirectives() + .UseDefinitionLists() .UseEnhancedCodeBlocks() .DisableHtml() .UseHardBreaks() diff --git a/tests/authoring/Container/DefinitionLists.fs b/tests/authoring/Container/DefinitionLists.fs new file mode 100644 index 000000000..be25a5bb9 --- /dev/null +++ b/tests/authoring/Container/DefinitionLists.fs @@ -0,0 +1,59 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information + +module ``container elements``.``vertical definition lists`` + +open Xunit +open authoring + +type ``simple multiline definition with markup`` () = + + static let markdown = Setup.Markdown """ +This is my `definition` +: And this is the definition **body** + Which may contain multiple lines +""" + + [] + let ``validate HTML`` () = + markdown |> convertsToHtml """ +
+
This is my definition
+
+

And this is the definition body
+ Which may contain multiple lines

+
+
+ """ + [] + let ``has no errors`` () = markdown |> hasNoErrors + +type ``with embedded directives`` () = + + static let markdown = Setup.Markdown """ +This is my `definition` +: And this is the definition **body** + Which may contain multiple lines + :::{note} + My note + ::: +""" + + [] + let ``validate HTML`` () = + markdown |> convertsToHtml """ +
+
This is my definition
+
+

And this is the definition body
+ Which may contain multiple lines

+
+

Note

+

My note

+
+
+
+ """ + [] + let ``has no errors`` () = markdown |> hasNoErrors diff --git a/tests/authoring/authoring.fsproj b/tests/authoring/authoring.fsproj index 29d89d23e..3c058305a 100644 --- a/tests/authoring/authoring.fsproj +++ b/tests/authoring/authoring.fsproj @@ -37,4 +37,8 @@ + + + +