AshleyShrok.ViewModelShell.Markdown 0.1.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package AshleyShrok.ViewModelShell.Markdown --version 0.1.0
                    
NuGet\Install-Package AshleyShrok.ViewModelShell.Markdown -Version 0.1.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="AshleyShrok.ViewModelShell.Markdown" Version="0.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="AshleyShrok.ViewModelShell.Markdown" Version="0.1.0" />
                    
Directory.Packages.props
<PackageReference Include="AshleyShrok.ViewModelShell.Markdown" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add AshleyShrok.ViewModelShell.Markdown --version 0.1.0
                    
#r "nuget: AshleyShrok.ViewModelShell.Markdown, 0.1.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package AshleyShrok.ViewModelShell.Markdown@0.1.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=AshleyShrok.ViewModelShell.Markdown&version=0.1.0
                    
Install as a Cake Addin
#tool nuget:?package=AshleyShrok.ViewModelShell.Markdown&version=0.1.0
                    
Install as a Cake Tool

AshleyShrok.ViewModelShell.Markdown

Markdown → ViewNode subtree converter for AshleyShrok.ViewModelShell. Byte-parallel to the TS twin @ashley-shrok/viewmodel-shell/markdown — feed the same markdown string into either and get an equivalent ViewNode subtree.

Why a separate package

Core VMS has zero runtime dependencies. This package adds a PackageReference to Markdig and ships as a companion so a consumer that never renders markdown never pulls Markdig into their build graph — the same "opt-in via subpath" seam the npm side uses for marked.

Usage

using ViewModelShell;
using ViewModelShell.Markdown;

string md = "# Hello\n\nA paragraph with **bold** and a [link](https://ex.com).";

IReadOnlyList<ViewNode> nodes = MarkdownConverter.ToViewNodes(md);

// Compose into any children slot:
var page = new PageNode(Title: "Docs", Children: nodes);

Set MarkdownOptions.External = true to mark every link in the parsed markdown as opening outside the current app context (new tab + noopener in the browser).

Coverage

Everything the TS twin supports, on the same input, producing the same subtree shape:

  • Headings 1–6 → TextNode with Level (real <h1>–<h6>)
  • Paragraphs → TextNode, with inline Runs only when formatting is present
  • Ordered / unordered / nested lists → ListNode + ListItemNode
  • GFM task-list markers → ListItemNode.Completed
  • Blockquotes → BlockquoteNode
  • Fenced code blocks → CodeBlockNode with Language
  • Images → ImageNode (image-only paragraphs unwrap to standalone images; the markdown-title third argument becomes Caption)
  • Horizontal rules → DividerNode
  • Inline bold / italic / strikethrough / inline code / links → InlineRun flags + Href

Deferred v1 (silently skipped): raw HTML blocks, tables (rich table cells are a separate design pass), footnotes, definition lists.

License

MIT.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.2.3 194 8/19/2026
0.2.2 135 8/2/2026
0.2.1 116 7/30/2026
0.2.0 112 7/29/2026
0.1.0 113 7/23/2026