Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
refactor(client): remove unnecessary code
Elian Doran784e434fc8b8
diff --git a/apps/client/src/services/syntax_highlight.ts b/apps/client/src/services/syntax_highlight.tsindex affadc2f29..7dfb29f30d 100644--- a/apps/client/src/services/syntax_highlight.ts+++ b/apps/client/src/services/syntax_highlight.ts@@ -4,19 +4,6 @@ import options from "./options.js";let highlightingLoaded = false;-export function getStylesheetUrl(theme: string) {- if (!theme) {- return null;- }-- const defaultPrefix = "default:";- if (theme.startsWith(defaultPrefix)) {- return `${window.glob.assetPath}/node_modules/@highlightjs/cdn-assets/styles/${theme.substr(defaultPrefix.length)}.min.css`;- }-- return null;-}-/*** Identifies all the code blocks (as `pre code`) under the specified hierarchy and uses the highlight.js library to obtain the highlighted text which is then applied on to the code blocks.*diff --git a/apps/client/src/widgets/note_detail.ts b/apps/client/src/widgets/note_detail.tsindex 2386838099..3b232134a1 100644--- a/apps/client/src/widgets/note_detail.ts+++ b/apps/client/src/widgets/note_detail.ts@@ -3,12 +3,10 @@ import NoteContextAwareWidget from "./note_context_aware_widget.js";import protectedSessionHolder from "../services/protected_session_holder.js";import SpacedUpdate from "../services/spaced_update.js";import server from "../services/server.js";-import libraryLoader from "../services/library_loader.js";import appContext, { type CommandListenerData, type EventData } from "../components/app_context.js";import keyboardActionsService from "../services/keyboard_actions.js";import noteCreateService from "../services/note_create.js";import attributeService from "../services/attributes.js";-import attributeRenderer from "../services/attribute_renderer.js";import EmptyTypeWidget from "./type_widgets/empty.js";import EditableTextTypeWidget from "./type_widgets/editable_text.js";@@ -30,7 +28,6 @@ import ContentWidgetTypeWidget from "./type_widgets/content_widget.js";import AttachmentListTypeWidget from "./type_widgets/attachment_list.js";import AttachmentDetailTypeWidget from "./type_widgets/attachment_detail.js";import MindMapWidget from "./type_widgets/mind_map.js";-import { getStylesheetUrl, isSyntaxHighlightEnabled } from "../services/syntax_highlight.js";import GeoMapTypeWidget from "./type_widgets/geo_map.js";import utils from "../services/utils.js";import type { NoteType } from "../entities/fnote.js";