x/tools/cmd/present: improper handling of "pressing enter" while editing #41139
Labels
FrozenDueToAge
NeedsFix
The path to resolution is known, but the work has not been done.
Tools
This label describes issues relating to any tools in the x/tools repository.
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Given the following
.slide
fileAnd the following
go
fileRunning go present and navigating to the second slide with the editable code.
Importing
time
in the slide while presenting like soAnd then running the code.
What did you expect to see?
There should be an error because
time
is not in use.What did you see instead?
It still shows the
Hello world!
output.Further explanation (with pics)
I investigated this further and it looks like the issue is on the html side.
Here's how the html looks like initially

Pressing enter in the slide code adds another

<pre>
tag that essentially splits the codeTyping

"time"
doesn't add a new span for itThis results in
"time"
getting interpreted as being on the same line as the comment (// this is a comment
).Therefore, the snippet complies and runs.
The text was updated successfully, but these errors were encountered: