feat: add syntax highlighting and code block styling with theme support

This commit is contained in:
2025-10-21 08:34:46 -04:00
parent 062d743481
commit d788c9d267
75 changed files with 4783 additions and 830 deletions
+3 -1
View File
@@ -12,7 +12,9 @@ export type LogEvent =
| 'GRAPH_VIEW_CLOSE'
| 'GRAPH_VIEW_SETTINGS_CHANGE'
| 'CALENDAR_SEARCH_EXECUTED'
| 'THEME_CHANGE';
| 'THEME_CHANGE'
| 'THEME_MODE_CHANGE'
| 'LANGUAGE_CHANGE';
export interface LogContext {
route?: string;
@@ -32,7 +32,7 @@ export class SearchHighlighterService {
// Add highlighted match
const matchText = text.substring(range.start, range.end);
result += `<mark class="bg-yellow-200 dark:bg-yellow-600 text-gray-900 dark:text-gray-900 px-0.5 rounded font-medium">${this.escapeHtml(matchText)}</mark>`;
result += `<mark class="bg-yellow-200 dark:bg-yellow-600 text-main dark:text-main px-0.5 rounded font-medium">${this.escapeHtml(matchText)}</mark>`;
lastIndex = range.end;
}