mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
[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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user