Skip to content

Commit c19b6da

Browse files
committed
Fixups for updated docs
1 parent e3d303c commit c19b6da

File tree

4 files changed

+4
-3
lines changed

4 files changed

+4
-3
lines changed

samples/MvvmSample.Core/Helpers/MarkdownHelper.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public static IReadOnlyDictionary<string, string> GetParagraphs(string text)
2424
Regex.Matches(text, @"(?<=\W)#+ ([^\n]+).+?(?=\W#|$)", RegexOptions.Singleline)
2525
.OfType<Match>()
2626
.ToDictionary(
27-
m => m.Groups[1].Value.Trim().Replace("&lt;", "<"),
27+
m => Regex.Replace(m.Groups[1].Value.Trim().Replace("&lt;", "<"), @"\[([^]]+)\]\([^)]+\)", m => m.Groups[1].Value),
2828
m => m.Groups[0].Value.Trim().Replace("&lt;", "<").Replace("[!WARNING]", "**WARNING:**").Replace("[!NOTE]", "**NOTE:**"));
2929
}
3030
}

samples/MvvmSample.Core/ViewModels/SamplePageViewModel.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ private async Task LoadDocsAsync(string? name)
7070

7171
// Fixups
7272
string trimmedText = Regex.Replace(text, @"[ \r\n]+?!\[[^]]+\]\([^)]+\)[ \r\n]+?", string.Empty); // Drop image links
73+
string updatedText = trimmedText.Replace("(/dotnet", "(https://docs.microsoft.com/dotnet"); // Update relative links
7374

7475
Texts = MarkdownHelper.GetParagraphs(trimmedText);
7576

samples/MvvmSampleUwp/Views/IntroductionPage.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
<ScrollViewer Padding="{StaticResource DocumentationPageContentPadding}" CanContentRenderOutsideBounds="True">
2323
<StackPanel Spacing="16">
24-
<controls:DocumentationBlock Text="{x:Bind ViewModel.GetParagraph('Introduction to the MVVM package'), Mode=OneWay}" />
24+
<controls:DocumentationBlock Text="{x:Bind ViewModel.GetParagraph('Introduction to the MVVM Toolkit'), Mode=OneWay}" />
2525
<controls:DocumentationBlock Text="{x:Bind ViewModel.GetParagraph('When should I use this package?'), Mode=OneWay}" />
2626
</StackPanel>
2727
</ScrollViewer>

samples/MvvmSampleUwp/Views/RelayCommandPage.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
<ScrollViewer Padding="{StaticResource DocumentationPageContentPadding}" CanContentRenderOutsideBounds="True">
2323
<StackPanel Spacing="16">
24-
<controls:DocumentationBlock Text="{x:Bind ViewModel.GetParagraph('RelayCommand'), Mode=OneWay}" />
24+
<controls:DocumentationBlock Text="{x:Bind ViewModel.GetParagraph('RelayCommand and RelayCommand&lt;T>'), Mode=OneWay}" />
2525
<controls:DocumentationBlock Text="{x:Bind ViewModel.GetParagraph('How they work'), Mode=OneWay}" />
2626
<controls:DocumentationBlock Text="{x:Bind ViewModel.GetParagraph('Working with `ICommand`'), Mode=OneWay}" />
2727

0 commit comments

Comments
 (0)