Skip to content
This repository was archived by the owner on Feb 25, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 0 additions & 19 deletions Microsoft.Toolkit.Parsers/Microsoft.Toolkit.Parsers.csproj

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ namespace Microsoft.Toolkit.Uwp.SampleApp.Controls
/// </summary>
internal class SampleAppMarkdownRenderer : MarkdownRenderer
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@RosarioPulella this is what helps display the docs within the Sample App, so I don't think we can remove it? Is it because the MarkdownRenderer would be internalized now? That could be a problem... I think we'd still want that class exposed?

Or did this just move somewhere else?

{
#pragma warning disable CS0618 // Type or member is obsolete
public SampleAppMarkdownRenderer(MarkdownDocument document, ILinkRegister linkRegister, IImageResolver imageResolver, ICodeBlockResolver codeBlockResolver)
: base(document, linkRegister, imageResolver, codeBlockResolver)
{
Expand Down Expand Up @@ -514,5 +515,6 @@ private class CustomCodeBlock

public string CurrentLanguage { get; set; }
}
#pragma warning restore CS0618 // Type or member is obsolete
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -745,9 +745,6 @@
<Compile Include="SamplePages\ListViewExtensions\ListViewExtensionsPage.xaml.cs">
<DependentUpon>ListViewExtensionsPage.xaml</DependentUpon>
</Compile>
<Compile Include="SamplePages\MarkdownParser\MarkdownParserPage.xaml.cs">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch! 👍

<DependentUpon>MarkdownParserPage.xaml</DependentUpon>
</Compile>
<Compile Include="SamplePages\Menu\Commands\VsCommands.cs" />
<Compile Include="SamplePages\Menu\MenuPage.xaml.cs">
<DependentUpon>MenuPage.xaml</DependentUpon>
Expand Down Expand Up @@ -1175,10 +1172,6 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="SamplePages\MarkdownParser\MarkdownParserPage.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="SamplePages\Mouse\MouseCursorPage.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
Expand Down Expand Up @@ -1401,10 +1394,6 @@
</Page>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Microsoft.Toolkit.Parsers\Microsoft.Toolkit.Parsers.csproj">
<Project>{42CA4935-54BE-42EA-AC19-992378C08DE6}</Project>
<Name>Microsoft.Toolkit.Parsers</Name>
</ProjectReference>
<ProjectReference Include="..\Microsoft.Toolkit.Uwp.Connectivity\Microsoft.Toolkit.Uwp.Connectivity.csproj">
<Project>{b1e850ff-dde6-44d5-a830-34250e97a687}</Project>
<Name>Microsoft.Toolkit.Uwp.Connectivity</Name>
Expand Down

This file was deleted.

This file was deleted.

8 changes: 0 additions & 8 deletions Microsoft.Toolkit.Uwp.SampleApp/SamplePages/samples.json
Original file line number Diff line number Diff line change
Expand Up @@ -857,14 +857,6 @@
"Icon": "/Assets/Helpers.png",
"DocumentationUrl": "https://github.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/behaviors/FocusBehavior.md"
},
{
"Name": "Markdown Parser",
"Type": "MarkdownParserPage",
"Subcategory": "Parser",
"About": "The Markdown Parser allows you to parse a Markdown String into a Markdown Document, and then Render it with a Markdown Renderer.",
"Icon": "/Assets/Helpers.png",
"DocumentationUrl": "https://github.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/parsers/MarkdownParser.md"
},
{
"Name": "Win2d Path Mini Language Parser",
"Type": "CanvasPathGeometryPage",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ private void RenderMarkdown()
try
{
// Try to parse the markdown.
#pragma warning disable CS0618 // Type or member is obsolete
MarkdownDocument markdown = new MarkdownDocument();
foreach (string str in SchemeList.Split(',').ToList())
{
Expand All @@ -71,6 +72,7 @@ private void RenderMarkdown()
MarkdownDocument.KnownSchemes.Add(str);
}
}
#pragma warning restore CS0618 // Type or member is obsolete

markdown.Parse(Text);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,8 @@
<None Include="$(OutDir)\Design\$(MSBuildProjectName).Design*.dll;$(OutDir)\Design\$(MSBuildProjectName).Design*.pdb" Pack="true" PackagePath="lib\$(TargetFramework)\Design" />
</ItemGroup>

<ItemGroup>
<Compile Update="Properties\Resources.Designer.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
</ItemGroup>

<ItemGroup>
<EmbeddedResource Update="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>

<ItemGroup>
<PackageReference Include="ColorCode.UWP" Version="2.0.6" />
<ProjectReference Include="..\Microsoft.Toolkit.Parsers\Microsoft.Toolkit.Parsers.csproj" />
<ProjectReference Include="..\Microsoft.Toolkit.Uwp.UI.Controls.Core\Microsoft.Toolkit.Uwp.UI.Controls.Core.csproj" />
<ProjectReference Include="..\Microsoft.Toolkit.Uwp.UI\Microsoft.Toolkit.Uwp.UI.csproj" />
</ItemGroup>
Expand Down
11 changes: 11 additions & 0 deletions Microsoft.Toolkit.Uwp.UI.Controls.Markdown/Parsers/Constants.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

namespace Microsoft.Toolkit.Parsers
{
internal static class Constants
{
internal const string ParserObsoleteMsg = "Parsing code has been deprecated, we suggest using Markdig. See https://github.com/windows-toolkit/WindowsCommunityToolkit/issues/3200 for more info.";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

using System;
using System.Collections.Generic;

namespace Microsoft.Toolkit.Parsers
Expand All @@ -10,6 +11,7 @@ namespace Microsoft.Toolkit.Parsers
/// Parser interface.
/// </summary>
/// <typeparam name="T">Type to parse into.</typeparam>
[Obsolete(Constants.ParserObsoleteMsg)]
public interface IParser<out T>
where T : SchemaBase
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

using System;

namespace Microsoft.Toolkit.Parsers.Core
{
/// <summary>
/// This class offers helpers for Parsing.
/// </summary>
[Obsolete(Constants.ParserObsoleteMsg)]
public static class ParseHelpers
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

using System;

namespace Microsoft.Toolkit.Parsers
{
/// <summary>
/// Strong typed schema base class.
/// </summary>
[Obsolete(Constants.ParserObsoleteMsg)]
public abstract class SchemaBase
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ namespace Microsoft.Toolkit.Parsers.Core
/// The StringValue attribute is used as a helper to decorate enum values with string representations.
/// </summary>
[AttributeUsage(AttributeTargets.Field)]
[Obsolete(Constants.ParserObsoleteMsg)]
public sealed class StringValueAttribute : Attribute
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

using System;
using System.Text;
using Microsoft.Toolkit.Parsers.Markdown.Helpers;

Expand All @@ -11,6 +12,7 @@ namespace Microsoft.Toolkit.Parsers.Markdown.Blocks
/// Represents a block of text that is displayed in a fixed-width font. Inline elements and
/// escape sequences are ignored inside the code block.
/// </summary>
[Obsolete(Constants.ParserObsoleteMsg)]
public class CodeBlock : MarkdownBlock
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ namespace Microsoft.Toolkit.Parsers.Markdown.Blocks
/// <seealso href="https://spec.commonmark.org/0.29/#atx-headings">Single-Line Header CommonMark Spec</seealso>
/// <seealso href="https://spec.commonmark.org/0.29/#setext-headings">Two-Line Header CommonMark Spec</seealso>
/// </summary>
[Obsolete(Constants.ParserObsoleteMsg)]
public class HeaderBlock : MarkdownBlock
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

using System;
using Microsoft.Toolkit.Parsers.Core;

namespace Microsoft.Toolkit.Parsers.Markdown.Blocks
{
/// <summary>
/// Represents a horizontal line.
/// </summary>
[Obsolete(Constants.ParserObsoleteMsg)]
public class HorizontalRuleBlock : MarkdownBlock
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

using System;
using Microsoft.Toolkit.Parsers.Core;
using Microsoft.Toolkit.Parsers.Markdown.Inlines;

Expand All @@ -10,6 +11,7 @@ namespace Microsoft.Toolkit.Parsers.Markdown.Blocks
/// <summary>
/// Represents the target of a reference ([ref][]).
/// </summary>
[Obsolete(Constants.ParserObsoleteMsg)]
public class LinkReferenceBlock : MarkdownBlock
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

using System;
using System.Collections.Generic;

namespace Microsoft.Toolkit.Parsers.Markdown.Blocks
{
/// <summary>
/// This specifies the Content of the List element.
/// </summary>
[Obsolete(Constants.ParserObsoleteMsg)]
public class ListItemBlock
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

using System;
using System.Text;

namespace Microsoft.Toolkit.Parsers.Markdown.Blocks
{
[Obsolete(Constants.ParserObsoleteMsg)]
internal class ListItemBuilder : MarkdownBlock
{
public StringBuilder Builder { get; } = new StringBuilder();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

using System;

namespace Microsoft.Toolkit.Parsers.Markdown.Blocks
{
[Obsolete(Constants.ParserObsoleteMsg)]
internal class ListItemPreamble
{
public ListStyle Style { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

using System;

namespace Microsoft.Toolkit.Parsers.Markdown.Blocks
{
[Obsolete(Constants.ParserObsoleteMsg)]
internal class NestedListInfo
{
public ListBlock List { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ namespace Microsoft.Toolkit.Parsers.Markdown.Blocks
/// <summary>
/// Represents a list, with each list item proceeded by either a number or a bullet.
/// </summary>
[Obsolete(Constants.ParserObsoleteMsg)]
public class ListBlock : MarkdownBlock
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

using System;
using System.Collections.Generic;
using Microsoft.Toolkit.Parsers.Markdown.Helpers;
using Microsoft.Toolkit.Parsers.Markdown.Inlines;
Expand All @@ -11,6 +12,7 @@ namespace Microsoft.Toolkit.Parsers.Markdown.Blocks
/// <summary>
/// Represents a block of text that is displayed as a single paragraph.
/// </summary>
[Obsolete(Constants.ParserObsoleteMsg)]
public class ParagraphBlock : MarkdownBlock
{
/// <summary>
Expand Down
Loading