We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a966c6e commit d860c5bCopy full SHA for d860c5b
web/src/editor.js
@@ -9,8 +9,18 @@ end
9
10
`;
11
12
+const THEMES = {
13
+ light: "vs-light",
14
+ dark: "hc-black",
15
+};
16
+
17
export const init = (target, opts) => {
18
+ const theme = window.matchMedia?.("(prefers-color-scheme: dark)").matches
19
+ ? "dark"
20
+ : "light";
21
22
return monaco.editor.create(target, {
23
+ theme: THEMES[theme],
24
value: DEFAULT_CODE,
25
language: "ruby",
26
automaticLayout: true,
web/src/game.js
@@ -78,7 +78,7 @@ class Game {
78
}
79
80
get playerrb() {
81
- return this.vm.eval(`File.read("${this.gameDir}/player.rb")`).toString();
+ return this.vm.eval(`File.read("${this.gameDir}/player.rb")`).toString().replace(/\n+$/, '\n');
82
83
84
get profile() {
0 commit comments