Mark newlines as verbatim (#517)

* Merge

* Add missing key
This commit is contained in:
Max Goedjen 2024-01-16 19:49:14 -08:00 committed by GitHub
parent de8d18f9e9
commit 30c1d36974
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 11 additions and 11 deletions

View File

@ -1,12 +1,6 @@
{ {
"sourceLanguage" : "en", "sourceLanguage" : "en",
"strings" : { "strings" : {
"\n" : {
},
"\n\n" : {
},
"agent_not_running_notice_title" : { "agent_not_running_notice_title" : {
"localizations" : { "localizations" : {
"de" : { "de" : {
@ -3368,6 +3362,12 @@
"value" : "Secretive %1$@" "value" : "Secretive %1$@"
} }
}, },
"pt-BR" : {
"stringUnit" : {
"state" : "translated",
"value" : "Secretive %1$@"
}
},
"zh-Hans" : { "zh-Hans" : {
"stringUnit" : { "stringUnit" : {
"state" : "translated", "state" : "translated",

View File

@ -42,16 +42,16 @@ struct UpdateDetailView<UpdaterType: Updater>: View {
if let prefix = split.first { if let prefix = split.first {
switch prefix { switch prefix {
case "#": case "#":
attributed = Text(unprefixed).font(.title) + Text("\n") attributed = Text(unprefixed).font(.title) + Text(verbatim: "\n")
case "##": case "##":
attributed = Text(unprefixed).font(.title2) + Text("\n") attributed = Text(unprefixed).font(.title2) + Text(verbatim: "\n")
case "###": case "###":
attributed = Text(unprefixed).font(.title3) + Text("\n") attributed = Text(unprefixed).font(.title3) + Text(verbatim: "\n")
default: default:
attributed = Text(line) + Text("\n\n") attributed = Text(line) + Text(verbatim: "\n\n")
} }
} else { } else {
attributed = Text(line) + Text("\n\n") attributed = Text(line) + Text(verbatim: "\n\n")
} }
text = text + attributed text = text + attributed
} }