Merge "Make sure to define the custom-element for codemirror-element"
diff --git a/web/BUILD b/web/BUILD
index 2547585..3c91428 100644
--- a/web/BUILD
+++ b/web/BUILD
@@ -74,7 +74,6 @@
         "@plugins_npm//@codemirror/lint",
         "@plugins_npm//@codemirror/search",
         "@plugins_npm//@codemirror/state",
-        "@plugins_npm//@codemirror/theme-one-dark",
         "@plugins_npm//@codemirror/view",
     ],
 )
diff --git a/web/element/extensions.ts b/web/element/extensions.ts
index 398684c..58a0f23 100644
--- a/web/element/extensions.ts
+++ b/web/element/extensions.ts
@@ -35,13 +35,12 @@
 import {rulerPlugin} from './ruler';
 import {language} from './language';
 import {EditPreferencesInfo} from './codemirror-element';
-import {oneDark} from '@codemirror/theme-one-dark';
 
 const trailingspace = () =>
   EditorView.theme({
     '.cm-trailingspace': {
       'background-color': '#fce8e6',
-      "border": '1px solid #c5221f',
+      border: '1px solid #c5221f',
       'border-radius': '2px',
     },
   });
@@ -60,7 +59,7 @@
       'background-size': 'none',
       'background-position': 'none',
       'background-repeat': 'none',
-      "display": 'inline-block',
+      display: 'inline-block',
       'text-decoration': 'inherit',
     },
     '.cm-highlightTab:before': {
@@ -79,27 +78,22 @@
     '.cm-scroller': {overflow: 'auto'},
   });
 
-const oneLight = EditorView.theme({
-  '&': {background: 'white'},
-  '.cm-lineNumbers': {'background-color': '#f1f3f4'},
-});
-
 export const extensions = (
-    height: number,
-    prefs?: EditPreferencesInfo,
-    fileType?: string,
-    fileContent?: string,
-    darkMode?: boolean
+  height: number,
+  prefs?: EditPreferencesInfo,
+  fileType?: string,
+  fileContent?: string,
+  _darkMode?: boolean
 ) => {
   // This uses the preference to detect whether
   // to use 'tabs' when you use the tab button
   // or to use 'spaces' when using the tab button.
   const tab = prefs?.indent_with_tabs
     ? {
-      key: 'Tab',
-      preventDefault: true,
-      run: insertTab,
-    }
+        key: 'Tab',
+        preventDefault: true,
+        run: insertTab,
+      }
     : indentWithTab;
 
   const codeExtensions: Array<Extension> = [
@@ -170,11 +164,5 @@
     codeExtensions.push(EditorState.lineSeparator.of('\r\n'));
   }
 
-  if (darkMode) {
-    codeExtensions.push(oneDark);
-  } else {
-    codeExtensions.push(oneLight);
-  }
-
   return codeExtensions;
 };