-
-
Notifications
You must be signed in to change notification settings - Fork 40
Refactor markdown properties to handle whitespace #559
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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"); | ||
|
Comment on lines
+66
to
+68
|
||
|
|
||
| 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"); | ||
|
Comment on lines
+79
to
+81
|
||
|
|
||
| OnPropertyChanged(); | ||
| } | ||
| } | ||
| public string CloudSaveMatchTitle | ||
| { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The replacement values "\u00A0\u00A0\u00A0\u00A0" are magic strings that appear multiple times without explanation. The decision to replace tabs and four spaces with exactly four non-breaking spaces is not documented. Consider extracting these as named constants with clear documentation explaining why this specific replacement is necessary for fixing the white background issue.