aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/utils.ts
diff options
context:
space:
mode:
authorAjay Ramachandran <[email protected]>2020-12-15 14:03:01 -0500
committerAjay Ramachandran <[email protected]>2020-12-15 14:03:01 -0500
commitb6b109b226de7cc5373941cc1eb059a33c2a516a (patch)
tree5888c4f02aa53435dd8a01ea598d798f67abce23 /src/utils.ts
parente31aaba24cac3484acc75d70eb32cab0c8065772 (diff)
downloadSponsorBlock-b6b109b226de7cc5373941cc1eb059a33c2a516a.tar.gz
SponsorBlock-b6b109b226de7cc5373941cc1eb059a33c2a516a.zip
Convert \n in localized strings to <br/> for html
Diffstat (limited to 'src/utils.ts')
-rw-r--r--src/utils.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/utils.ts b/src/utils.ts
index 149d99cf..6f30a854 100644
--- a/src/utils.ts
+++ b/src/utils.ts
@@ -206,7 +206,7 @@ class Utils {
getLocalizedMessage(text: string): string | false {
const valNewH = text.replace(/__MSG_(\w+)__/g, function(match, v1) {
- return v1 ? chrome.i18n.getMessage(v1) : "";
+ return v1 ? chrome.i18n.getMessage(v1).replace("\n", "<br/>") : "";
});
if(valNewH != text) {