From 34eb27dbbab6b48fec0ae77dfbf0fb9c3e1b0f29 Mon Sep 17 00:00:00 2001 From: Eulenhorn <91565745+Eulenhorn@users.noreply.github.com> Date: Wed, 31 Dec 2025 22:58:21 +0100 Subject: [PATCH] Refactor markdown properties to handle whitespace Updated the set accessors for DescriptionMarkdown and NotesMarkdown properties to replace tabs and spaces with non-breaking spaces. --- gamevault/ViewModels/GameViewViewModel.cs | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/gamevault/ViewModels/GameViewViewModel.cs b/gamevault/ViewModels/GameViewViewModel.cs index f8e0c4e..e020455 100644 --- a/gamevault/ViewModels/GameViewViewModel.cs +++ b/gamevault/ViewModels/GameViewViewModel.cs @@ -1,4 +1,4 @@ -using gamevault.Models; +using gamevault.Models; using System; using System.Collections.Generic; using System.ComponentModel; @@ -61,12 +61,27 @@ public bool? IsDownloaded public string? DescriptionMarkdown { get { return descriptionMarkdown; } - set { descriptionMarkdown = value; OnPropertyChanged(); } + set + { + descriptionMarkdown = value? + .Replace("\t", "\u00A0\u00A0\u00A0\u00A0") + .Replace(" ", "\u00A0\u00A0\u00A0\u00A0"); + + OnPropertyChanged(); + } } + public string? NotesMarkdown { get { return notesMarkdown; } - set { notesMarkdown = value; OnPropertyChanged(); } + set + { + notesMarkdown = value? + .Replace("\t", "\u00A0\u00A0\u00A0\u00A0") + .Replace(" ", "\u00A0\u00A0\u00A0\u00A0"); + + OnPropertyChanged(); + } } public string CloudSaveMatchTitle {