From 6b05db4de089dd609b71dea85530be50d6d98177 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Pol=C3=A1=C5=A1ek?= Date: Wed, 24 Sep 2025 23:33:01 +0200 Subject: [PATCH] CmdPal: Enable pipe table and emphasis extensions for markdown content (#41989) ## Summary of the Pull Request This PR enables MarkDig extensions on MarkdownTextBlocks to enable pipe tables and to enable advanced emphasis (like strikethrough). - Sets `UsePipeTables` and `UseEmphasisExtras` to true. - Adds pipe table and HTML table to samples. image ## PR Checklist - [x] Closes: #41984 - [ ] **Communication:** I've discussed this with core contributors already. If the work hasn't been agreed, this work might be rejected - [ ] **Tests:** Added/updated and all pass - [ ] **Localization:** All end-user-facing strings can be localized - [ ] **Dev docs:** Added/updated - [ ] **New binaries:** Added on the required places - [ ] [JSON for signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json) for new binaries - [ ] [WXS for installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs) for new binaries and localization folder - [ ] [YML for CI pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml) for new test projects - [ ] [YML for signed pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml) - [ ] **Documentation updated:** If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys) and link it here: #xxx ## Detailed Description of the Pull Request / Additional comments ## Validation Steps Performed --- .../ExtViews/ContentPage.xaml | 4 +- .../Microsoft.CmdPal.UI/Pages/ShellPage.xaml | 4 +- .../Pages/SampleMarkdownPage.cs | 39 +++++++++++++++++++ 3 files changed, 45 insertions(+), 2 deletions(-) diff --git a/src/modules/cmdpal/Microsoft.CmdPal.UI/ExtViews/ContentPage.xaml b/src/modules/cmdpal/Microsoft.CmdPal.UI/ExtViews/ContentPage.xaml index 5c128192d8..896efcc8b7 100644 --- a/src/modules/cmdpal/Microsoft.CmdPal.UI/ExtViews/ContentPage.xaml +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI/ExtViews/ContentPage.xaml @@ -55,7 +55,9 @@ + Text="{x:Bind Body, Mode=OneWay}" + UseEmphasisExtras="True" + UsePipeTables="True" /> diff --git a/src/modules/cmdpal/Microsoft.CmdPal.UI/Pages/ShellPage.xaml b/src/modules/cmdpal/Microsoft.CmdPal.UI/Pages/ShellPage.xaml index d00d5320e0..a610e24726 100644 --- a/src/modules/cmdpal/Microsoft.CmdPal.UI/Pages/ShellPage.xaml +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI/Pages/ShellPage.xaml @@ -427,7 +427,9 @@ Margin="0,4,0,24" Background="Transparent" Config="{StaticResource DefaultMarkdownConfig}" - Text="{x:Bind ViewModel.Details.Body, Mode=OneWay}" /> + Text="{x:Bind ViewModel.Details.Body, Mode=OneWay}" + UseEmphasisExtras="True" + UsePipeTables="True" /> + + +a +b +c + + + + +0 +1 +2 + + +3 +4 +5 + + + + + ## Advanced Markdown +[Markdig - emphasis extensions](https://github.com/xoofx/markdig/blob/master/src/Markdig.Tests/Specs/EmphasisExtraSpecs.md) + Note: Some syntax which is not standard to native Markdown. They're extensions of the language. ### Strike-throughs