Skip to content
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
Show all changes
91 commits
Select commit Hold shift + click to select a range
00f9e98
-Split the Markdown Parser from MarkdownTextBlock.
WilliamABradley Nov 26, 2017
1e1600b
Made old MarkdownRenderedEventArgs obsolete.
WilliamABradley Nov 26, 2017
f68fec8
-Broke MarkdownTextBlock.cs into Categorised partial sections.
WilliamABradley Nov 26, 2017
75ff445
Fixed Header.
WilliamABradley Nov 26, 2017
900efc9
-Created MarkdownRendererBase from XamlRenderer, the initial cross pl…
WilliamABradley Nov 26, 2017
9650653
Renamed XamlRenderer to UWPMarkdownRenderer, as it doesn't Render any…
WilliamABradley Nov 26, 2017
432af33
-Made RenderBlocks virtual, it only gets overriden if it has to.
WilliamABradley Nov 26, 2017
b2d1385
Fixed missing Headers.
WilliamABradley Nov 26, 2017
2f34ae2
Added ICodeBlockResolver and CodeBlockResolving event, a way to injec…
WilliamABradley Nov 27, 2017
812e9e9
Fixed XML Comment, warned that Resolving events require Handled = true.
WilliamABradley Nov 27, 2017
c0aae98
-Restyled default MarkdownTextBlock brushes and layout, it is now mor…
WilliamABradley Nov 27, 2017
7d6140c
Moved BlockUIElementCollection object and InlineCollection ojbect ins…
WilliamABradley Nov 27, 2017
78bf888
-Added Automatic Markdown Code Block Syntax Highlighting!!! :) This w…
WilliamABradley Nov 28, 2017
7b5c53f
-Moved Markdown and RSS Parsers to new Microsoft.Toolkit.Parsers proj…
WilliamABradley Dec 5, 2017
f133914
Merge branch 'master' into MakeMarkdownUniversalAgain
WilliamABradley Dec 5, 2017
0ff9bc1
Fixed Namespace change issues.
WilliamABradley Dec 5, 2017
6dc2ccf
-Cleaned up a lot of Markdown documents to make them look better and …
WilliamABradley Dec 9, 2017
26f9f6c
Added License Header to ThemeListener
WilliamABradley Dec 9, 2017
c38d72c
-Updated CodeRenderer to use RichTextBlock and ColorCode-Universal, r…
WilliamABradley Dec 10, 2017
a848683
-Made MarkdownDocument more visible.
WilliamABradley Dec 10, 2017
4c88633
-Improved InitialContent.md for MarkdownTextBlock Sample.
WilliamABradley Dec 10, 2017
5ef17ca
Added Tooltips to Links.
WilliamABradley Dec 18, 2017
2248a43
-Added Property to Enable Code Block Text Wrapping.
WilliamABradley Dec 18, 2017
15dd257
Updated Documentation.
WilliamABradley Dec 18, 2017
816952b
Small Tweaks.
WilliamABradley Dec 18, 2017
aabec2e
ProcessDocs now handles Microsoft Note Notation.
WilliamABradley Dec 18, 2017
2cfa459
Updated Docs Metadata.
WilliamABradley Dec 18, 2017
2aecb67
Merge branch 'master' into MakeMarkdownUniversalAgain
WilliamABradley Jan 17, 2018
6b5b5a4
Fixed Unit Test Compile errors.
WilliamABradley Jan 17, 2018
d5ed7ae
-Made Common Internal, added externally used helpers to public static…
WilliamABradley Jan 17, 2018
b48b22c
-Added Obsoleted classes for Microsoft.Toolkit.Services, Microsoft.To…
WilliamABradley Jan 17, 2018
ba49e9c
-Made Markdown Blocks and Elements have a public constructor again, a…
WilliamABradley Jan 17, 2018
70ae74e
Removed all remaining dependencies from obsolete StringValueAttribute…
WilliamABradley Jan 17, 2018
8b934bf
Fixed VS warnings related to this PR.
WilliamABradley Jan 17, 2018
e5234e7
-Restuctured Markdown Parser folders and namespaces, now instead of M…
WilliamABradley Jan 17, 2018
ff71a18
Separated nested Classes and Enums to their own file.
WilliamABradley Jan 17, 2018
b8c3cb5
Fixed missing space.
WilliamABradley Jan 17, 2018
17500c9
Removed UWP Prefix from UWPMarkdownRenderer.
WilliamABradley Jan 17, 2018
3d0292b
Replaced ParseHelpers IsBlankOrWhitespace and IsWhiteSpace, with stri…
WilliamABradley Jan 19, 2018
77b35b4
Revert "Replaced ParseHelpers IsBlankOrWhitespace and IsWhiteSpace, w…
WilliamABradley Jan 19, 2018
6e5751b
Renamed ParseHelpers IsBlankOrWhiteSpace and IsWhiteSpace to IsMarkdo…
WilliamABradley Jan 19, 2018
5747f40
Fixed Access modifiers for RSS classes that don't need to be exposed.
WilliamABradley Jan 19, 2018
39cc0c4
Added Deprecation to Microsoft.Toolkit.Uwp.Services.Core.ExtensionMet…
WilliamABradley Jan 19, 2018
054f088
Added Documentation for Markdown Parser, added LinkClicked event to d…
WilliamABradley Jan 19, 2018
da59db2
-Added ThemeListener Documentation.
WilliamABradley Jan 19, 2018
1216f32
MarkdownTextBlock now will react to changes to RequestedTheme, as lon…
WilliamABradley Jan 19, 2018
caee71a
Improved Documentation.
WilliamABradley Jan 19, 2018
6271453
Added Basic Rss and Json Parser documentation.
WilliamABradley Jan 19, 2018
5a6c77e
Simplified Theme Checking.
WilliamABradley Jan 19, 2018
ef1ea23
-Added null checks to IRenderContext casting for UWP MarkdownRenderer…
WilliamABradley Jan 20, 2018
6562cf9
Add null check to MarkdownTextBlock RenderMarkdown, for Types that ar…
WilliamABradley Jan 20, 2018
3c3de6c
-Added Support for DocFX Notes in SampleAppMarkdownRenderer.
WilliamABradley Jan 20, 2018
9e1ace2
Added extra Null Check.
WilliamABradley Jan 20, 2018
2f4c55b
-Modified Sample.cs to only grab the latest copy only and cache in Re…
WilliamABradley Jan 20, 2018
e41e632
Fixed Documentation formatting issues related to Markdown correctness…
WilliamABradley Jan 20, 2018
fcb4b16
Fixed all but one pesky Unit Test.
WilliamABradley Jan 20, 2018
cb5c310
Fixed the last Pesky Unit Test.
WilliamABradley Jan 20, 2018
912b229
-Code Blocks now only semi-broken in ListBlock. Need to escape Tab ch…
WilliamABradley Jan 20, 2018
b346c6c
Fixed ListBlock swallowing any extra Whitespace.
WilliamABradley Jan 20, 2018
6b37dd4
-Restored Animation Docs to their former Glory, with more correct for…
WilliamABradley Jan 20, 2018
0c22cef
Made DocFX Notation formatting in line with docs.microsoft.com.
WilliamABradley Jan 20, 2018
612be34
Merge branch 'master' of https://github.com/Microsoft/UWPCommunityToo…
WilliamABradley Jan 23, 2018
524733a
Added Parser Documentation improvements.
WilliamABradley Jan 23, 2018
6ee4b01
-Added LinkReferenceInline in the Parser, a way to collect <a> HTML t…
WilliamABradley Jan 23, 2018
369ee04
Internalised JsonParser, I don't see it used anywhere, but it might b…
WilliamABradley Jan 24, 2018
7b40e2d
-Added better examples to RSS and Markdown Docs.
WilliamABradley Jan 24, 2018
18ab2ba
-Removed Comments from StaggeredPanel.
WilliamABradley Jan 24, 2018
ecf3644
Added Properties and Methods to RSSParser and MarkdownParser docs.
WilliamABradley Jan 24, 2018
689f817
Merge branch 'master' into MakeMarkdownUniversalAgain
WilliamABradley Jan 24, 2018
4448985
Fixed FrameworkElementExtensions docs.
WilliamABradley Jan 24, 2018
852ee7a
Merge branch 'master' of https://github.com/Microsoft/UWPCommunityToo…
WilliamABradley Jan 30, 2018
c1a65f0
-Fixed bug in BoldItalicTextInline.
WilliamABradley Jan 31, 2018
1d9ea98
Disabled the ThemeListener Sample for the time being.
WilliamABradley Jan 31, 2018
e194a21
Reverted most of the changes to the Animation Documentation.
WilliamABradley Feb 4, 2018
4d2ef94
Yet another fix for ListBlock logic.
WilliamABradley Feb 4, 2018
0b00a06
Fixed HamburgerMenu nav link.
WilliamABradley Feb 4, 2018
623479a
More Doc fixes.
WilliamABradley Feb 4, 2018
2d2bf1d
Fixed naming conventions and locations for Markdown Docs.
WilliamABradley Feb 6, 2018
b4b1dec
-Simplified SampleAppMarkdownRenderer structure, added extra comments…
WilliamABradley Feb 6, 2018
02155bd
Merge branch 'master' of https://github.com/Microsoft/UWPCommunityToo…
WilliamABradley Feb 6, 2018
8e320fa
Fixed VS complaints.
WilliamABradley Feb 7, 2018
d5911c4
Merge branch 'master' of https://github.com/Microsoft/UWPCommunityToo…
WilliamABradley Feb 10, 2018
dca5553
Renamed LinkReferenceInline to LinkAnchorInline, as it is a more fit…
WilliamABradley Feb 10, 2018
d078053
Fixed more VS complaints.
WilliamABradley Feb 10, 2018
3212cb6
Merged changes from UWPCommunityToolkit/Master into MakeMarkdownUnive…
WilliamABradley Feb 12, 2018
2c96d80
Merged UWPCommunityToolkit/Master into MakeMarkdownUniversalAgain.
WilliamABradley Feb 12, 2018
3137573
-Moved Extension methods to StringExtensions.
WilliamABradley Feb 13, 2018
929121e
Merge branch 'master' of https://github.com/Microsoft/UWPCommunityToo…
WilliamABradley Feb 13, 2018
36fb178
Fixed some more things.
WilliamABradley Feb 13, 2018
f4901eb
-Fixed naming and descriptions of StringExtensions.
WilliamABradley Feb 14, 2018
5faa708
-Added tests to MD test playlist.
WilliamABradley Feb 14, 2018
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
// ******************************************************************
// Copyright (c) Microsoft. All rights reserved.
// This code is licensed under the MIT License (MIT).
// THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
// THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE.
// ******************************************************************

namespace Microsoft.Toolkit.Services.Markdown.Display
{
/// <summary>
/// Helper for holding persistent state of Renderer.
/// </summary>
public interface IRenderContext
{
/// <summary>
/// Gets or sets a value indicating whether to trim whitespace.
/// </summary>
bool TrimLeadingWhitespace { get; set; }

/// <summary>
/// Gets or sets the parent Element for this Context.
/// </summary>
object Parent { get; set; }

/// <summary>
/// Clones the Context.
/// </summary>
/// <returns>Clone</returns>
IRenderContext Clone();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
// ******************************************************************
// Copyright (c) Microsoft. All rights reserved.
// This code is licensed under the MIT License (MIT).
// THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
// THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE.
// ******************************************************************

using Microsoft.Toolkit.Services.Markdown.Parse;

namespace Microsoft.Toolkit.Services.Markdown.Display
{
/// <summary>
/// Block Rendering Methods.
/// </summary>
public partial class MarkdownRendererBase
{
/// <summary>
/// Renders a paragraph element.
/// </summary>
protected abstract void RenderParagraph(ParagraphBlock element, IRenderContext context);

/// <summary>
/// Renders a header element.
/// </summary>
protected abstract void RenderHeader(HeaderBlock element, IRenderContext context);

/// <summary>
/// Renders a list element.
/// </summary>
protected abstract void RenderListElement(ListBlock element, IRenderContext context);

/// <summary>
/// Renders a horizontal rule element.
/// </summary>
protected abstract void RenderHorizontalRule(IRenderContext context);

/// <summary>
/// Renders a quote element.
/// </summary>
protected abstract void RenderQuote(QuoteBlock element, IRenderContext context);

/// <summary>
/// Renders a code element.
/// </summary>
protected abstract void RenderCode(CodeBlock element, IRenderContext context);

/// <summary>
/// Renders a table element.
/// </summary>
protected abstract void RenderTable(TableBlock element, IRenderContext context);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
// ******************************************************************
// Copyright (c) Microsoft. All rights reserved.
// This code is licensed under the MIT License (MIT).
// THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
// THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE.
// ******************************************************************

using Microsoft.Toolkit.Services.Markdown.Parse;

namespace Microsoft.Toolkit.Services.Markdown.Display
{
/// <summary>
/// Inline Rendering Methods.
/// </summary>
public partial class MarkdownRendererBase
{
/// <summary>
/// Renders emoji element.
/// </summary>
/// <param name="element"> The parsed inline element to render. </param>
/// <param name="context"> Persistent state. </param>
protected abstract void RenderEmoji(EmojiInline element, IRenderContext context);

/// <summary>
/// Renders a text run element.
/// </summary>
/// <param name="element"> The parsed inline element to render. </param>
/// <param name="context"> Persistent state. </param>
protected abstract void RenderTextRun(TextRunInline element, IRenderContext context);

/// <summary>
/// Renders a bold run element.
/// </summary>
/// <param name="element"> The parsed inline element to render. </param>
/// <param name="context"> Persistent state. </param>
protected abstract void RenderBoldRun(BoldTextInline element, IRenderContext context);

/// <summary>
/// Renders a link element
/// </summary>
/// <param name="element"> The parsed inline element to render. </param>
/// <param name="context"> Persistent state. </param>
protected abstract void RenderMarkdownLink(MarkdownLinkInline element, IRenderContext context);

/// <summary>
/// Renders an image element.
/// </summary>
/// <param name="element"> The parsed inline element to render. </param>
/// <param name="context"> Persistent state. </param>
protected abstract void RenderImage(ImageInline element, IRenderContext context);

/// <summary>
/// Renders a raw link element.
/// </summary>
/// <param name="element"> The parsed inline element to render. </param>
/// <param name="context"> Persistent state. </param>
protected abstract void RenderHyperlink(HyperlinkInline element, IRenderContext context);

/// <summary>
/// Renders a text run element.
/// </summary>
/// <param name="element"> The parsed inline element to render. </param>
/// <param name="context"> Persistent state. </param>
protected abstract void RenderItalicRun(ItalicTextInline element, IRenderContext context);

/// <summary>
/// Renders a strikethrough element.
/// </summary>
/// <param name="element"> The parsed inline element to render. </param>
/// <param name="context"> Persistent state. </param>
protected abstract void RenderStrikethroughRun(StrikethroughTextInline element, IRenderContext context);

/// <summary>
/// Renders a superscript element.
/// </summary>
/// <param name="element"> The parsed inline element to render. </param>
/// <param name="context"> Persistent state. </param>
protected abstract void RenderSuperscriptRun(SuperscriptTextInline element, IRenderContext context);

/// <summary>
/// Renders a code element
/// </summary>
/// <param name="element"> The parsed inline element to render. </param>
/// <param name="context"> Persistent state. </param>
protected abstract void RenderCodeRun(CodeInline element, IRenderContext context);
}
}
Loading