Fixing netlify

This commit is contained in:
Zef Hemel
2024-01-20 22:53:51 +01:00
parent 9734c0f14c
commit 4133cabd52
11 changed files with 60 additions and 17 deletions
+5
View File
@@ -136,6 +136,11 @@ export class MarkdownWidget extends WidgetType {
}
private attachListeners(div: HTMLElement, buttons?: CodeWidgetButton[]) {
div.addEventListener("mousedown", (e) => {
// CodeMirror overrides mousedown on parent elements to implement its own selection highlighting.
// That's nice, but not for markdown widgets, so let's not propagate the event to CodeMirror here.
e.stopPropagation();
});
// Override wiki links with local navigate (faster)
div.querySelectorAll("a[data-ref]").forEach((el_) => {
const el = el_ as HTMLElement;
+1 -1
View File
@@ -42,7 +42,7 @@ export class CommandHook extends EventEmitter<CommandHookEvents>
throttledBuildAllCommands = throttle(() => {
this.buildAllCommands().catch(console.error);
}, 1000);
}, 200);
async buildAllCommands() {
this.editorCommands.clear();
+4
View File
@@ -410,6 +410,10 @@
.sb-markdown-widget {
margin: 0 0 -4ch 0;
::selection {
background-color: var(--editor-selection-background-color) !important;
}
}
.sb-markdown-top-widget h1,