diff options
author | Ajay Ramachandran <[email protected]> | 2020-12-15 14:03:01 -0500 |
---|---|---|
committer | Ajay Ramachandran <[email protected]> | 2020-12-15 14:03:01 -0500 |
commit | b6b109b226de7cc5373941cc1eb059a33c2a516a (patch) | |
tree | 5888c4f02aa53435dd8a01ea598d798f67abce23 | |
parent | e31aaba24cac3484acc75d70eb32cab0c8065772 (diff) | |
download | SponsorBlock-b6b109b226de7cc5373941cc1eb059a33c2a516a.tar.gz SponsorBlock-b6b109b226de7cc5373941cc1eb059a33c2a516a.zip |
Convert \n in localized strings to <br/> for html
-rw-r--r-- | src/utils.ts | 2 |
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) { |