Skip to content

Commit

Permalink
fix: allow localized log messages to include newlines
Browse files Browse the repository at this point in the history
  • Loading branch information
tucats committed Jan 23, 2025
1 parent 310f7f3 commit 9bc93f8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions i18n/subs.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ func HandleSubstitutionMap(text string, valueMap map[string]interface{}) string
return text
}

// Before we get cranking, fix any escaped newlines.
text = strings.ReplaceAll(text, "\\n", "\n")

return handleSubstitutionMap(text, valueMap)
}

Expand Down
2 changes: 1 addition & 1 deletion runtime/rest/exchange.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ func Exchange(endpoint, method string, body interface{}, response interface{}, a
}

if replyMedia := restResponse.Header().Get("Content-Type"); replyMedia != "" {
ui.Log(ui.RestLogger, "rest.repy.media",
ui.Log(ui.RestLogger, "rest.reply.media",
"media", replyMedia)
}

Expand Down

0 comments on commit 9bc93f8

Please sign in to comment.