Command Line Execution Recognises New Lines, However Syntax Highlighting Does Not

Explanation

When multiline code is copied into the Command bar, it runs as it would in a script, with any comments only affecting the particular line that is commented out.

However, this replication does not extend to the syntax highlighting. If there is a comment in the pasted code, anything after that is visually shown as a comment, even if they aren’t actually commented.

Expected Result:

image
(There’s a new line between Comment and local)

Actual Result:

image

Reproduction

  1. Copy into the command bar any multiline code containing a comment.
  2. Run the code and see that it runs as expected, with only the actual comment not running.
  3. Observe that the syntax highlighting shows everything after the comment as a comment

A small snippet of code to test this is:

-- Amazing Comment
local Var = "Hello World"
warn(Var)

Alternatively, this code can be used to show it only affects after the comment:

local ReplicatedStorage = game.ReplicatedStorage
-- Amazing Comment
local Var = "Hello World"
warn(Var)

Device Info

Operating System: Windows 10
CPU: Ryzen 5 3600
GPU: GTX 1650 Super
RAM: 16GB @ 3600MHz

2 Likes

We’ve filed a ticket into our internal database for this issue, and will come back as soon as we have updates!

Thanks for flagging!

Hi we have plans to convert the command bar into a mini script editor to align functionality, this will be completed when that ships. Just let us know if you have any questions, thanks!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.