Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix lists continuations. #435

Merged
merged 7 commits into from
Feb 10, 2025
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Elastic.Markdown/Myst/Comments/CommentBlockParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ public override bool Close(BlockProcessor processor, Block block)
{
if (!processor.TrackTrivia)
{
var heading = (HeadingBlock)block;
var heading = (CommentBlock)block;
heading.Lines.Trim();
}

Expand Down
1 change: 0 additions & 1 deletion src/Elastic.Markdown/Myst/MarkdownParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ public static MarkdownPipeline Pipeline
return _pipeline;

var builder = new MarkdownPipelineBuilder()
.EnableTrackTrivia()
.UseInlineAnchors()
.UsePreciseSourceLocation()
.UseDiagnosticLinks()
Expand Down
30 changes: 30 additions & 0 deletions tests/authoring/Blocks/Lists.fs
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
// 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 ``block elements``.``list elements``

open Xunit
open authoring

type ``supports loose lists`` () =
static let markdown = Setup.Markdown """
* **Consumption-based billing**:

You pay for the actual product used, regardless of the application or use case. This is different from subscription-based billing models where customers pay a flat fee restricted by usage quotas, or one-time upfront payment billing models such as those used for on-prem software licenses.

You can purchase credits for a single or multi-year contract. Consumption is on demand, and every month we deduct from your balance based on your usage and contract terms. This allows you to seamlessly expand your usage to the full extent of your requirements and available budget, without any quotas or restrictions.
"""

[<Fact>]
let ``validate HTML: adds paragraphs`` () =
markdown |> convertsToHtml """
<ul>
<li>
<p>
<strong>Consumption-based billing</strong>:</p>
<p>You pay for the actual product used, regardless of the application or use case. This is different from subscription-based billing models where customers pay a flat fee restricted by usage quotas, or one-time upfront payment billing models such as those used for on-prem software licenses.</p>
<p>You can purchase credits for a single or multi-year contract. Consumption is on demand, and every month we deduct from your balance based on your usage and contract terms. This allows you to seamlessly expand your usage to the full extent of your requirements and available budget, without any quotas or restrictions.</p>
</li>
</ul>
"""

1 change: 1 addition & 0 deletions tests/authoring/authoring.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@

<ItemGroup>
<Compile Include="Blocks\CodeBlocks\CodeBlocks.fs" />
<Compile Include="Blocks\Lists.fs" />
</ItemGroup>

</Project>
Loading