Windowscommunitytoolkit: Diff syntax highlighting in MarkdownTextblock

Created on 7 Nov 2017  路  12Comments  路  Source: windows-toolkit/WindowsCommunityToolkit

I'm submitting a...

[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report  <!-- Please search GitHub for a similar issue or PR before submitting -->
[x] Feature request
[ ] Sample app request
[ ] Documentation issue or request
[ ] Question of Support request => Please do not submit support request here, instead see https://github.com/Microsoft/UWPCommunityToolkit/blob/master/contributing.md#question

UserVoice link

https://wpdev.uservoice.com/forums/110705-universal-windows-platform/suggestions/32159233-diff-syntax-highlighting-in-markdowntextblock

Current behavior

Diff syntax highlighting is currently not supported in MarkdownTextblock. This would be useful for GitHub related scenarios.

@@ -52,17 +52,6 @@ 
// Unchanged code 
- // Deleted line 
+ // Added line

Expected behavior

@@ -52,17 +52,6 @@ 
// Unchanged code 
- // Deleted line 
+ // Added line

Environment

Nuget Package(s): 

Package Version(s): 

Windows 10 Build Number:
- [ ] Anniversary Update (14393) 
- [ ] Creators Update (15063)
- [ ] Fall Creators Update (16299)
- [ ] Insider Build (xxxxx)

App min and target version:
- [x] Anniversary Update (14393) 
- [ ] Creators Update (15063)
- [ ] Fall Creators Update (16299)
- [ ] Insider Build (xxxxx)

Device form factor:
- [ ] Desktop
- [ ] Mobile
- [ ] Xbox
- [ ] Surface Hub
- [ ] IoT

Visual Studio 
- [ ] 2017 15.3
- [x] 2017 15.4

controls help wanted improvements markdown 馃搼

All 12 comments

Great suggestion. Thanks for creating a UserVoice entry. If you are up for it, feel free to submit a PR to add this feature

Ok I'll start working on a PR 馃憤

Is this part of Markdown standard? Just curious.

There isn't really a markdown standard, commonMark probably being the most common one. Don't believe diff syntax higlighting is in commonMark, but it's used in many markdown implementations.

This has relevance to #1650

Whats the current status?

Closing the issue because of inactivity. Let's reopen if someone wants to work on it.

Let's leave this issue open in case someone wants to work on it. I'll mark it as help wanted

1650 is now finished, and there is a PR here for this: WilliamABradley/ColorCode-Universal#3

@aalok05 was this resolved?

@Kyaa-dost @aalok05 this isn't supported out of the box, but I believe @WilliamABradley was hinting that with addition of the ColorCode package and the possibility to have the Render do custom actions, it could be enabled? However, I'm not really sure how to do that (though our Sample App does some of this for its own wrappers for DocFX).

@MihaZupan is this syntax supported by the GitHub extensions to Markdig? As that'd make this scenario easier to handle with #3200.

Markdig will parse this as any other fenced code block, and the renderer will output the language-diff class to it.
It's up to other css/js to handle styling of such html.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Sergio0694 picture Sergio0694  路  48Comments

achabill picture achabill  路  46Comments

WilliamABradley picture WilliamABradley  路  33Comments

deltakosh picture deltakosh  路  34Comments

deltakosh picture deltakosh  路  55Comments