Skip to content

Incorrect "@end" tag placement when executed code block has errors #4

@jumpyjacko

Description

@jumpyjacko

This leaves some garbage behind when re-executing a code block after failing.

Example:

@code python
print(f)
@end

#exec.start 2023.10.15T10.54.19AEDT
#exec.end 0.0000s 1
@result
Traceback (most recent call last):

  File "/tmp/neorg-exec/15.python", line 1, in <module>
    print(f)
@end
          ^
NameError: name 'f' is not defined

Which leaves behind the rest of the error message when running the code block again.

Not limited to only python as seen here

@code rust
println!("{}", a)
@end

#exec.start 2023.10.15T10.56.28AEDT
#exec.end 0.0000s 1
@result
error[E0425]: cannot find value `a` in this scope

 --> /tmp/neorg-exec/17.rust:2:32
  |
2 |                 println!("{}", a)
  |                                ^ not found in this scope

error: aborting due to previous error
@end

For more information about this error, try `rustc --explain E0425`.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions