https://github.com/phil-scott-78/markdig.semanticui
Extension to use SemanticUi classes with Markdig
https://github.com/phil-scott-78/markdig.semanticui
markdig markdown semantic-ui
Last synced: about 1 month ago
JSON representation
Extension to use SemanticUi classes with Markdig
- Host: GitHub
- URL: https://github.com/phil-scott-78/markdig.semanticui
- Owner: phil-scott-78
- License: mit
- Created: 2017-02-01T18:18:23.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-02-01T18:53:37.000Z (over 9 years ago)
- Last Synced: 2025-07-27T15:20:54.616Z (10 months ago)
- Topics: markdig, markdown, semantic-ui
- Language: C#
- Size: 9.77 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Markdig.SemanticUi
Extension to use SemanticUi classes with Markdig.
* Adds `ui table` to table elements (when the advanced extension is also used)
* Adds `ui spaced image` to images
[](https://www.nuget.org/packages/Markdig.SemanticUi) [](https://ci.appveyor.com/project/enkafan/markdig-semanticui/branch/master) [](https://www.codefactor.io/repository/github/enkafan/markdig.semanticui)
## Examples
Images
``` csharp
const string markdown = "My image ";
const string expected = "
My image 
\n";
var pipeline = new MarkdownPipelineBuilder()
.UseAdvancedExtensions()
.UseSemanticUi()
.Build();
var result = Markdown.ToHtml(markdown, pipeline);
result.ShouldBe(expected);
```
Tables
``` csharp
const string markdown = @"First Header | Second Header
------------ | -------------
Content from cell 1 | Content from cell 2
Content in the first column | Content in the second column";
const string expected = @"
First Header
Second Header
Content from cell 1
Content from cell 2
Content in the first column
Content in the second column
";
var pipeline = new MarkdownPipelineBuilder()
.UseAdvancedExtensions()
.UseSemanticUi()
.Build();
var result = Markdown.ToHtml(markdown, pipeline);
result.ShouldBe(expected);
```