Skip to content

Commit b789eb0

Browse files
committed
feat: trim whitespace from editor content on initialization
1 parent 7e8e530 commit b789eb0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

components/monaco-editor/monaco-editor.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@ export default class MonacoEditor extends HTMLElement {
3030

3131
require(['vs/editor/editor.main'], () => {
3232
this.#editor = monaco.editor.create(this.shadowRoot.querySelector("#editor"), {
33-
value: this.textContent,
33+
value: this.textContent.trim(),
3434
language: this.language,
3535
theme: this.theme,
3636
automaticLayout: true,
3737
});
38-
});
38+
});
3939
}
4040
};
4141

0 commit comments

Comments
 (0)