Code cleanup, translations, show empty categories

This commit is contained in:
VincentMeilinger
2024-03-26 18:13:24 +01:00
parent d201690332
commit 6ae9926c41
7 changed files with 289 additions and 402 deletions

View File

@@ -126,13 +126,11 @@ class ObservableRecipeDetail: ObservableObject {
var attributedString = AttributedString(ingredient)
for (newSubstring, matchRange) in matches {
print(newSubstring, matchRange)
guard let range = Range(matchRange, in: attributedString) else { continue }
var attributedSubString = AttributedString(newSubstring)
//attributedSubString.foregroundColor = .ncTextHighlight
attributedSubString.font = .system(.body, weight: .bold)
attributedString.replaceSubrange(range, with: attributedSubString)
print("\n", attributedString)
}
return attributedString