Closed Pave87 closed 5 months ago
So when working with markdown file in VS Studio or Code preview shows code blocks (~~~ and ```) as a block.
Please post the exact problem you are encountering with a proof of work/not work on https://babelmark.github.io/
When I enter sample from my file there is prints out as expected.
But file that I get when running in my C# project prints out code differently. Code:
var pipeline = new MarkdownPipelineBuilder().UseAdvancedExtensions().Build();
var result = Markdown.ToHtml(File.ReadAllText("doc.md"), pipeline);
File.WriteAllText("doc.html", result.ToString());
I'm going to update the markdig on babelmark as the version is a bit old and will double check your case.
The markdown you posted above:
You can also use Scanner specific defaults.
~~~
<AddMissingValues >
<Customer>SampleCustomer</Customer>
<Product>SampleProduct</Product>
</AddMissingValues>
~~~
Outputs the following with Markdig:
<p>You can also use Scanner specific defaults.</p>
<pre><code><AddMissingValues >
<Customer>SampleCustomer</Customer>
<Product>SampleProduct</Product>
</AddMissingValues>
</code></pre>
Which is correct, so I'm not sure what are you expecting, but I don't think there ia an issue with Markdig here.
So when working with markdown file in VS Studio or Code preview shows code blocks (~~~ and ```) as a block. But for all I have tried with MarkDig to export this file to html it just very slightly different font and gets lost in other text.
CommonMark.org in their examples shows code block as a fenced block similar to how VS studio and Code show in their previews.