diff --git a/scripts/js/gravity.js b/scripts/js/gravity.js index 893763e8..36ee39a8 100644 --- a/scripts/js/gravity.js +++ b/scripts/js/gravity.js @@ -82,9 +82,13 @@ function parseLines(ta, str) { line = line.replaceAll("\r", "\n").replaceAll("\r", "\n"); // Last line from the textarea will be overwritten, so we remove it - ta.text(ta.text().substring(0, ta.text().lastIndexOf("\n"))); + ta.html(ta.html().substring(0, ta.html().lastIndexOf("\n"))); } + // Add some color to the text + line = line.replaceAll("[✓]", '[]'); + line = line.replaceAll("[✗]", '[]'); + // Append the new text to the end of the output ta.append(line); }