Reproducible in vscode.dev or in VS Code Desktop?
Reproducible in the monaco editor playground?
Monaco Editor Playground Link
https://microsoft.github.io/monaco-editor/playground.html?source=v0.55.1#XQAAAAJ8AAAAAAAAAABBqQkHQ5NjdMjwa-jY7SIQ9S7DNlzs5W-mwj0fe1ZCDRFc9ws9XQE0SJE1jc2VKxhaLFIw9vEWSxW3yscjtPHiSSzE4WUfroqWVtW5X_5X2Eu1DcEHUGBUpzkgp7MHVn16NTpxO4etzyW0R3-SXvNP__5c0AA
Monaco Editor Playground Code
function alpha() {
;
}
function beta() { //Comment
;
}
Reproduction Steps
- Paste the following code in the playground:
function alpha() {
}
function beta() { //Comment
}
- Place the cursor at the end of the line with
alpha() function header.
- Press Enter.
- There is an auto-indentation for the function body
- Now, pace the cursor at the end of the line with
beta() function header.
- Press Enter.
- There is not an auto-indentation.
Actual (Problematic) Behavior
A trailing comment on the function header prevents Monaco from applying the auto-indentation.
Expected Behavior
Both of the function bodies should receive the auto-indentation.
Additional Context
The equivalent bug exists for the following languages, checked on the Home page of Monaco:
- Python
- C
- C#
- Java
- Go
- PHP
- Rust
I have only verified these languages so far, therefore the list should not be considered exhaustive.
Reproducible in vscode.dev or in VS Code Desktop?
Reproducible in the monaco editor playground?
Monaco Editor Playground Link
https://microsoft.github.io/monaco-editor/playground.html?source=v0.55.1#XQAAAAJ8AAAAAAAAAABBqQkHQ5NjdMjwa-jY7SIQ9S7DNlzs5W-mwj0fe1ZCDRFc9ws9XQE0SJE1jc2VKxhaLFIw9vEWSxW3yscjtPHiSSzE4WUfroqWVtW5X_5X2Eu1DcEHUGBUpzkgp7MHVn16NTpxO4etzyW0R3-SXvNP__5c0AA
Monaco Editor Playground Code
Reproduction Steps
alpha()function header.beta()function header.Actual (Problematic) Behavior
A trailing comment on the function header prevents Monaco from applying the auto-indentation.
Expected Behavior
Both of the function bodies should receive the auto-indentation.
Additional Context
The equivalent bug exists for the following languages, checked on the Home page of Monaco:
I have only verified these languages so far, therefore the list should not be considered exhaustive.