Trim whitespace and newlines in instance rules list (#956)

This commit is contained in:
Henrik Nyh 2023-02-20 05:41:49 +00:00 committed by GitHub
parent 3038225371
commit 2508f98ce1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -38,7 +38,7 @@ public struct InstanceInfoSection: View {
if let rules = instance.rules {
Section("instance.info.section.rules") {
ForEach(rules) { rule in
Text(rule.text)
Text(rule.text.trimmingCharacters(in: .whitespacesAndNewlines))
}
}
.listRowBackground(theme.primaryBackgroundColor)