Greasy Fork is available in English.

Conversaciones » Comentarios y opiniones sobre Greasy Fork

Incorrect Counting for Additional Info Text Length

§
Publicado: 23/9/2023
Editado: 23/9/2023

To Jason:

It said maximum is 50000 characters.

but the textarea.value.length is just 49248.

I tried to use other ways to find the number 50000.

I cannot get it.

What is the conversion in Ruby? I guess Ruby might convert "<" and ">" to "<" ">", but the length is then much longer than 50000.

Is Chinese considered as two-character length in that 50000 limit?

And the 50000 limit is after markdown converted to HTML or the original text?

OK. I found it.

\n is treated as 2 characters. Is it because the conversion from \n to \r\n ?

Anyway, the counting is incorrect. \n shall be 1 char.

Publicar respuesta

Inicia sesión para responder.