Refactor, decompose and add previews. Fix part of speech sheet pop over

This commit is contained in:
Madeline
2022-10-08 08:35:14 -04:00
parent aae0b6c87e
commit 5999cc3533
12 changed files with 242 additions and 186 deletions

View File

@@ -44,6 +44,11 @@ class TokiDictionaryViewModel: ObservableObject {
dictionary = []
translatedDictionary = []
if input.isEmpty {
dictionary = fullDictionary
translatedDictionary.append(TokiSubWordListEntry("Dictionary"))
}
let capturePattern = #"(\w+)"#
let captures = self.searchStringForRegex(string: input, regex: capturePattern)
for capture in captures {