Markdown.ToHtml throws NullReferenceException #252

Closed
opened 2026-01-29 14:31:48 +00:00 by claunia · 0 comments
Owner

Originally created by @Metalnem on GitHub (Dec 24, 2018).

Markdown.ToHtml throws a NullReferenceException when converting the markdown file from the attached archive. You can run the following code to reproduce it (the path variable should contain the path to the extracted file):

var text = File.ReadAllText(path);
var pipeline = new MarkdownPipelineBuilder().UseAdvancedExtensions().Build();
Markdown.ToHtml(text, pipeline);

Found via SharpFuzz.

Originally created by @Metalnem on GitHub (Dec 24, 2018). **Markdown.ToHtml** throws a **NullReferenceException** when converting the markdown file from the [attached archive]. You can run the following code to reproduce it (the **path** variable should contain the path to the extracted file): ```csharp var text = File.ReadAllText(path); var pipeline = new MarkdownPipelineBuilder().UseAdvancedExtensions().Build(); Markdown.ToHtml(text, pipeline); ``` Found via [SharpFuzz]. [attached archive]: https://github.com/lunet-io/markdig/files/2707158/NullReferenceException.zip [SharpFuzz]: https://github.com/Metalnem/sharpfuzz
claunia added the bug label 2026-01-29 14:31:48 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/markdig#252