Discuss Scratch

pika_boo
Scratcher
100+ posts

Why are multiple spaces removed in descriptions

When you type multiple spaces in a row in project or studio descriptions, it only shows up as one space to others.
Probably a dumb question but just curious what was ST's reason behind this decision? I find it kind of annoying when I am trying to format the description to look better.

edit: this also happens when adding text in the costume editor

Last edited by pika_boo (Jan. 7, 2025 10:47:14)

Maximouse
Scratcher
1000+ posts

Why are multiple spaces removed in descriptions

It's possible that this wasn't even an intentional decision by the ST – this is what web browsers do by default.
Lorystories123
Scratcher
61 posts

Why are multiple spaces removed in descriptions

It happens in my projects, not necessarily the descriptions

I made a ‘fix this ST’ project all about it
BigNate469
Scratcher
1000+ posts

Why are multiple spaces removed in descriptions

Maximouse wrote:

It's possible that this wasn't even an intentional decision by the ST – this is what web browsers do by default.
^^^
This is what web browsers do by default.

Take a very simple HTML webpage, such as
<!DOCTYPE html>
<!-- This is a comment. It does nothing- just like a comment in Scratch. The above line is announcing to the browser that this is a HTML webpage -->
<html>
  <!--This is where all of the HTML actually goes-->
  <body>
    <!--Things rendered onto the screen-->
    <p>
      <!--Paragraph element-->
      Hello!
               This might be indented!
      <!--End of paragraph element-->
    </p>
    <!--End of body-->
  </body>
  <!--End of HTML-->
</head>

That will render as
Hello! This might be indented!
(you can test that for yourself by copying the above code into a text editor and saving the file as [filename].html (replace “filename” with what you want) and opening it using a web browser- you should just be able to open the file, and on most OSes it will launch a browser with the file in the tab it just opened)
Note how the “This might be indented” line is not actually indented. It's not even on its own line. This is because HTML is designed to ignore whitespace (spaces, tabes, newlines, etc.).

There is a way the ST could fix this, though.

Last edited by BigNate469 (Jan. 6, 2025 18:27:24)

pika_boo
Scratcher
100+ posts

Why are multiple spaces removed in descriptions

I might bug report it then (unless someone already has?)

Last edited by pika_boo (Jan. 6, 2025 23:01:38)

2016s4m29
Scratcher
1000+ posts

Why are multiple spaces removed in descriptions

pika_boo wrote:

(#5)
I might bug report it then (unless someone already has?)
This is an intentional feature on web browsers, there is no need to make a bug report for it on any site. Read This Post (#4 on this topic) for more information
pika_boo
Scratcher
100+ posts

Why are multiple spaces removed in descriptions

2016s4m29 wrote:

pika_boo wrote:

(#5)
I might bug report it then (unless someone already has?)
This is an intentional feature on web browsers, there is no need to make a bug report for it on any site. Read This Post (#4 on this topic) for more information

I agree it is intentional for web browsers, but I'm not sure if it is intentional for Scratch?

Maximouse wrote:

It's possible that this wasn't even an intentional decision by the ST

Especially since this is a text editor we are dealing with- normally it wouldn't be expected to remove characters
Many people wouldn't even realise that their formatting (in descriptions) is being removed because they can only see the editor view.

Last edited by pika_boo (Jan. 8, 2025 00:09:03)

pika_boo
Scratcher
100+ posts

Why are multiple spaces removed in descriptions

bump
pika_boo
Scratcher
100+ posts

Why are multiple spaces removed in descriptions

pika_boo
Scratcher
100+ posts

Why are multiple spaces removed in descriptions

Catzcute4
Scratcher
500+ posts

Why are multiple spaces removed in descriptions

what should be done is using <pre> instead of <p> , and changing the font to the scratch font, and adding the css to wrap lines

Last edited by Catzcute4 (Jan. 23, 2025 13:40:38)

CST1229
Scratcher
1000+ posts

Why are multiple spaces removed in descriptions

Catzcute4 wrote:

(#11)
what should be done is using <pre> instead of <p> , and changing the font to the scratch font, and adding the css to wrap lines
alternatively, just apply the CSS rule white-space: pre-wrap; which lets multiple spaces exist without doing anything else
CoderMCProX
Scratcher
500+ posts

Why are multiple spaces removed in descriptions

pika_boo wrote:

When you type multiple spaces in a row in project or studio descriptions, it only shows up as one space to others.
Probably a dumb question but just curious what was ST's reason behind this decision? I find it kind of annoying when I am trying to format the description to look better.

edit: this also happens when adding text in the costume editor
Probably because the web browser does it. maybe you can put a screenshot on this forum so then we can see what you mean.
pika_boo
Scratcher
100+ posts

Why are multiple spaces removed in descriptions

CoderMCProX wrote:

Probably because the web browser does it. Maybe you can put a screenshot on this forum so then we can see what you mean.
As others have been saying, it's the web browser, that's already confirmed. However the question is, was this an intentional decision by the ST to leave it, or should it be fixed (should I report it to bugs and glitches)? (see https://scratch-mit-edu.ezproxyberklee.flo.org/discuss/topic/798498/?page=1#post-8322086 )

Last edited by pika_boo (Jan. 23, 2025 22:27:54)

pika_boo
Scratcher
100+ posts

Why are multiple spaces removed in descriptions

I'll just report this be moved then. If ST thinks its a bug then they can move it
CoderMCProX
Scratcher
500+ posts

Why are multiple spaces removed in descriptions

pika_boo wrote:

When you type multiple spaces in a row in project or studio descriptions, it only shows up as one space to others.
Probably a dumb question but just curious what was ST's reason behind this decision? I find it kind of annoying when I am trying to format the description to look better.

edit: this also happens when adding text in the costume editor
I don't think this is a glitch.
GameCatastrophe0927
Scratcher
100+ posts

Why are multiple spaces removed in descriptions

This is neither a bug nor a glitch, it's literally just the way HTML works.
Maximouse
Scratcher
1000+ posts

Why are multiple spaces removed in descriptions

GameCatastrophe0927 wrote:

This is neither a bug nor a glitch, it's literally just the way HTML works.
It can be changed using the CSS white-space property.
Rosics
Scratcher
500+ posts

Why are multiple spaces removed in descriptions

Maximouse wrote:

GameCatastrophe0927 wrote:

This is neither a bug nor a glitch, it's literally just the way HTML works.
It can be changed using the CSS white-space property.
And all it takes it one guy to do it, it's pretty simple, if ST put these on comments, then we can have newlines on comments!

Last edited by Rosics (Jan. 27, 2025 19:07:13)

pika_boo
Scratcher
100+ posts

Why are multiple spaces removed in descriptions

GameCatastrophe0927 wrote:

This is neither a bug nor a glitch, it's literally just the way HTML works.
please read https://scratch-mit-edu.ezproxyberklee.flo.org/discuss/topic/798498/?page=1#post-8322086

Powered by DjangoBB