diff options
author | Daniel Weipert <code@drogueronin.de> | 2023-08-30 21:35:28 +0200 |
---|---|---|
committer | Daniel Weipert <code@drogueronin.de> | 2023-08-30 21:35:28 +0200 |
commit | 5214cdfbf26bc0bdee5d669a237fb8aefffb78d5 (patch) | |
tree | 7bec19278a0cf8fc1772e8eb6d985391d402c614 /resources/js/helpers.js | |
parent | 5e2e6753966c19616822915c14795bf62b589f68 (diff) |
story!
Diffstat (limited to 'resources/js/helpers.js')
-rw-r--r-- | resources/js/helpers.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/resources/js/helpers.js b/resources/js/helpers.js index 58e2113..bceaf5e 100644 --- a/resources/js/helpers.js +++ b/resources/js/helpers.js @@ -14,6 +14,15 @@ function slugToName (slug) { } /** + * @param {string} text + * + * @returns {string} + */ +function nl2br (text) { + return text.replace(new RegExp(/\\n/g), '<br>'); +} + +/** * @param {string} color * * @returns {string} |