From 88ad6df63c8d1ad5102adf67ef3bec429cb28370 Mon Sep 17 00:00:00 2001 From: NICK BRAIN Date: Sat, 30 Nov 2024 16:54:38 +0200 Subject: [PATCH] + renaming & validation correction --- My1kWordsEe/Components/Pages/{Error.razor => ErrorPage.razor} | 0 My1kWordsEe/Components/Pages/{Word.razor => WordPage.razor} | 0 My1kWordsEe/Components/Pages/{Words.razor => WordsPage.razor} | 0 My1kWordsEe/Models/Extensions.cs | 2 +- 4 files changed, 1 insertion(+), 1 deletion(-) rename My1kWordsEe/Components/Pages/{Error.razor => ErrorPage.razor} (100%) rename My1kWordsEe/Components/Pages/{Word.razor => WordPage.razor} (100%) rename My1kWordsEe/Components/Pages/{Words.razor => WordsPage.razor} (100%) diff --git a/My1kWordsEe/Components/Pages/Error.razor b/My1kWordsEe/Components/Pages/ErrorPage.razor similarity index 100% rename from My1kWordsEe/Components/Pages/Error.razor rename to My1kWordsEe/Components/Pages/ErrorPage.razor diff --git a/My1kWordsEe/Components/Pages/Word.razor b/My1kWordsEe/Components/Pages/WordPage.razor similarity index 100% rename from My1kWordsEe/Components/Pages/Word.razor rename to My1kWordsEe/Components/Pages/WordPage.razor diff --git a/My1kWordsEe/Components/Pages/Words.razor b/My1kWordsEe/Components/Pages/WordsPage.razor similarity index 100% rename from My1kWordsEe/Components/Pages/Words.razor rename to My1kWordsEe/Components/Pages/WordsPage.razor diff --git a/My1kWordsEe/Models/Extensions.cs b/My1kWordsEe/Models/Extensions.cs index b6607ae7..80587767 100644 --- a/My1kWordsEe/Models/Extensions.cs +++ b/My1kWordsEe/Models/Extensions.cs @@ -42,7 +42,7 @@ public static bool ValidateSentence(this string sentence) } var areWordsValid = sentence - .Split(new char[] { ' ', ',', '.', '?', '!', '-' }, StringSplitOptions.RemoveEmptyEntries) + .Split(new char[] { ' ', ',', '.', '?', '!', '-', '\'' }, StringSplitOptions.RemoveEmptyEntries) .All(w => w.ValidateWord()); return areWordsValid;