TDKCandidates // Trim newlines among lookup results.

This commit is contained in:
ShikiSuen 2022-10-26 09:00:24 +08:00
parent b543249f10
commit 86512eb625
4 changed files with 4 additions and 4 deletions

View File

@ -101,7 +101,7 @@ public struct VwrCandidateHorizontal: View {
ForEach(reverseLookupResult, id: \.self) { currentResult in
ZStack(alignment: .center) {
Color(white: colorScheme == .dark ? 0.3 : 0.9).cornerRadius(3)
Text(" \(currentResult) ").lineLimit(1)
Text(" \(currentResult.trimmingCharacters(in: .newlines)) ").lineLimit(1)
}.fixedSize()
}
}

View File

@ -108,7 +108,7 @@ public struct VwrCandidateVertical: View {
ForEach(reverseLookupResult, id: \.self) { currentResult in
ZStack(alignment: .center) {
Color(white: colorScheme == .dark ? 0.3 : 0.9).cornerRadius(3)
Text(" \(currentResult) ").lineLimit(1)
Text(" \(currentResult.trimmingCharacters(in: .newlines)) ").lineLimit(1)
}.fixedSize()
}
}

View File

@ -102,7 +102,7 @@ public struct VwrCandidateHorizontalBackports: View {
ForEach(reverseLookupResult, id: \.self) { currentResult in
ZStack(alignment: .center) {
Color(white: colorScheme == .dark ? 0.3 : 0.9).cornerRadius(3)
Text(" \(currentResult) ").lineLimit(1)
Text(" \(currentResult.trimmingCharacters(in: .newlines)) ").lineLimit(1)
}.fixedSize()
}
}

View File

@ -109,7 +109,7 @@ public struct VwrCandidateVerticalBackports: View {
ForEach(reverseLookupResult, id: \.self) { currentResult in
ZStack(alignment: .center) {
Color(white: colorScheme == .dark ? 0.3 : 0.9).cornerRadius(3)
Text(" \(currentResult) ").lineLimit(1)
Text(" \(currentResult.trimmingCharacters(in: .newlines)) ").lineLimit(1)
}.fixedSize()
}
}