An extension for Markdig that adds syntax highlighting to code through the power of ColorCode.
using Foo.Bar.Baz;
namespace Foo.Api;
public interface FooService {
/// <summary>
/// Gets a new Foo!
/// </summary>
/// <returns>A new Foo</returns>
public void GetFoo() {
return new Foo();
}
}using Foo.Bar.Baz;
namespace Foo.Api;
public interface FooService {
/// <summary>
/// Gets a new Foo!
/// </summary>
/// <returns>A new Foo</returns>
public void GetFoo() {
return new Foo();
}
}Install-Package Markdown.ColorCode -Version 1.1.1dotnet add package Markdown.ColorCode --version 1.1.1To use this extension with Markdig, simply install the Markdown.ColorCode package use the ColorCode extension:
var pipeline = new MarkdownPipelineBuilder()
.UseAdvancedExtensions()
.UseColorCode()
.Build();
var colorizedHtml = Markdig.Markdown.ToHtml(someMarkdown, pipeline);See the open issues for a list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated. For detailed contributing guidelines, please see CONTRIBUTING.md.
Distributed under the MIT License License. See LICENSE for more information.
Project Link: https://github.com/wbaldoumas/markdown-colorcode
This README was adapted from
https://github.com/othneildrew/Best-README-Template.