« get me outta code hell

scratchrlol - Simple HTML-based Scratch client
summary refs log tree commit diff
diff options
context:
space:
mode:
-rwxr-xr-xindex.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/index.js b/index.js
index b396421..1619d6a 100755
--- a/index.js
+++ b/index.js
@@ -95,7 +95,7 @@ const templates = {
   forumThread: (name, id) => `<a href="/topics/${id}">${filterHTML(name.trim())}</a>`,
 
   longField: text => {
-    return text.split('\n')
+    return text.split(/\r\n|\r|\n/g)
       .map(filterHTML)
       .reduce((arr, l, i, lines) =>
         [...arr.slice(0, -1), ...l.trim().length