WebAssembly functionally broken between 0.28.1 and 0.29.0 #531

Open
opened 2026-01-29 14:38:55 +00:00 by claunia · 0 comments
Owner

Originally created by @wleader on GitHub (Apr 22, 2022).

I was testing with some very simple code and I have observed the following:

This code does work in a .Net 6.0 Console application with version 0.29.0 & 0.28.1
This code does work in a .Net 6.0 Blazor Web Assembly project with version 0.28.1 and several earlier versions (28.0, 27.0, 22.0).
This code does not work in a .Net 6.0 Blazor Web Assembly project with version 0.29.0 and later.

By 'not work' what I observered is that the result of .ToHtml is an empty string. It is not null. No exceptions are thrown,

          var pipeline = new MarkdownPipelineBuilder()
            .UseAdvancedExtensions()
            .Build();
            var md = @"# Header";
            var result = Markdown.ToHtml(md, pipeline);
            Console.WriteLine(result);
            return result;

So as far as I can tell, something between 28.1 an 29.0 broke the ability for the library to function correctly within Blazor WebAssembly projects. I did review https://github.com/xoofx/markdig/compare/0.28.1...0.29.0 but nothing there jumped out at me as an obvious culprit.

Unfortunately its not that easy to debug .Net code running as WASM in a browser, so I am running up against my ability to work out what is going on here. I did attempt to set the Builder's DebugLog to Console.Out, to see if that would get me anything, but then a code search has turned up that almost nothing writes to DebugLog.

At the moment, I will be forced to stay on 0.28.1.

Originally created by @wleader on GitHub (Apr 22, 2022). I was testing with some very simple code and I have observed the following: This code does work in a .Net 6.0 Console application with version 0.29.0 & 0.28.1 This code does work in a .Net 6.0 Blazor Web Assembly project with version 0.28.1 and several earlier versions (28.0, 27.0, 22.0). This code does not work in a .Net 6.0 Blazor Web Assembly project with version 0.29.0 and later. By 'not work' what I observered is that the result of .ToHtml is an empty string. It is not null. No exceptions are thrown, var pipeline = new MarkdownPipelineBuilder() .UseAdvancedExtensions() .Build(); var md = @"# Header"; var result = Markdown.ToHtml(md, pipeline); Console.WriteLine(result); return result; So as far as I can tell, something between 28.1 an 29.0 broke the ability for the library to function correctly within Blazor WebAssembly projects. I did review https://github.com/xoofx/markdig/compare/0.28.1...0.29.0 but nothing there jumped out at me as an obvious culprit. Unfortunately its not that easy to debug .Net code running as WASM in a browser, so I am running up against my ability to work out what is going on here. I did attempt to set the Builder's DebugLog to Console.Out, to see if that would get me anything, but then a code search has turned up that almost nothing writes to DebugLog. At the moment, I will be forced to stay on 0.28.1.
claunia added the bug label 2026-01-29 14:38:55 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/markdig#531