[MIRROR] allows to use more newline breaks for longer posts (#8503)

Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
CHOMPStation2
2024-06-09 06:21:51 -07:00
committed by GitHub
parent debff42586
commit 981a1d1e48
4 changed files with 19 additions and 5 deletions

View File

@@ -59,8 +59,9 @@
input = copytext(input,1,max_length)
if(extra)
input = replacetext(input, new/regex("^\[\\n\]+|\[\\n\]+$", "g"), "")// strip leading and trailing new lines
var/temp_input = replace_characters(input, list("\n"=" ","\t"=" "))//one character is replaced by two
if(length(input) < (length(temp_input) - 6))//6 is the number of linebreaks allowed per message
if(length(input) < (length(temp_input) - 18))//18 is the number of linebreaks allowed per message
input = replace_characters(temp_input,list(" "=" "))//replace again, this time the double spaces with single ones
if(encode)