VS Code semicolon at the end of commented line

Minor thing but nevertheless surprising at first sight: is the following a bug in Julia VS Code extension or a feature?

# VS Code 1.54.3 Win10; Julia extension 1.1.38

b = 1   # CTRL + ENTER shows value in terminal

#  Nothing prints out for next line commented with semicolon at the end
b = 1   # note;

Never mind, the REPL has the same behavior…

Yes but seems like a bug in the REPL. I’m not sure where VS Code draws the line between itself and REPL, so there may be a bug there too.

EDIT: Yup, looks like a bug:

julia> import REPL.ends_with_semicolon

julia> ends_with_semicolon("a = 1 #;")
true

Seems like it includes a “comment parser” but fails in this case.

1 Like

I think I observed the same in jupyter the other day, where I commented out the last line of a cell which has a semicolon at the end and the output was still surpressed