Org Markdown : Markdig
All checks were successful
Dotnet build and test / build (pull_request) Successful in 6m22s
All checks were successful
Dotnet build and test / build (pull_request) Successful in 6m22s
This commit is contained in:
parent
44f0664a5d
commit
827cf7d2a3
7 changed files with 55 additions and 31 deletions
34
src/Yavsc.Org.Tests/MarkdownTests.cs
Normal file
34
src/Yavsc.Org.Tests/MarkdownTests.cs
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
using DotMarkdown.Linq;
|
||||
using Markdig;
|
||||
using Xunit;
|
||||
using static DotMarkdown.Linq.MFactory;
|
||||
|
||||
|
||||
public class MarkdownTests
|
||||
{
|
||||
[Fact]
|
||||
public void TestMarkdownRendering()
|
||||
{
|
||||
MDocument document = Document(
|
||||
Heading1("Markdown Sample"),
|
||||
Heading2("Bullet List"),
|
||||
BulletList(
|
||||
"text",
|
||||
Bold("bold text")),
|
||||
HorizontalRule(),
|
||||
Heading2("IndentedCodeBlock"),
|
||||
IndentedCodeBlock("string s = null;"));
|
||||
|
||||
Console.WriteLine(document.ToString());
|
||||
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void TestAnotherMarkdownRendering()
|
||||
{
|
||||
var result = Markdown.ToHtml("This is a text with some *emphasis*");
|
||||
|
||||
|
||||
Console.WriteLine(result);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue