Mark newlines as verbatim (#517)

* Merge

* Add missing key
Cette révision appartient à :
Max Goedjen
2024-01-17 03:49:14 +00:00
révisé par GitHub
Parent de8d18f9e9
révision 30c1d36974
2 fichiers modifiés avec 11 ajouts et 11 suppressions
+6 -6
Voir le fichier
@@ -1,12 +1,6 @@
{
"sourceLanguage" : "en",
"strings" : {
"\n" : {
},
"\n\n" : {
},
"agent_not_running_notice_title" : {
"localizations" : {
"de" : {
@@ -3368,6 +3362,12 @@
"value" : "Secretive %1$@"
}
},
"pt-BR" : {
"stringUnit" : {
"state" : "translated",
"value" : "Secretive %1$@"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
+5 -5
Voir le fichier
@@ -42,16 +42,16 @@ struct UpdateDetailView<UpdaterType: Updater>: View {
if let prefix = split.first {
switch prefix {
case "#":
attributed = Text(unprefixed).font(.title) + Text("\n")
attributed = Text(unprefixed).font(.title) + Text(verbatim: "\n")
case "##":
attributed = Text(unprefixed).font(.title2) + Text("\n")
attributed = Text(unprefixed).font(.title2) + Text(verbatim: "\n")
case "###":
attributed = Text(unprefixed).font(.title3) + Text("\n")
attributed = Text(unprefixed).font(.title3) + Text(verbatim: "\n")
default:
attributed = Text(line) + Text("\n\n")
attributed = Text(line) + Text(verbatim: "\n\n")
}
} else {
attributed = Text(line) + Text("\n\n")
attributed = Text(line) + Text(verbatim: "\n\n")
}
text = text + attributed
}