feat: add syntax highlighting and code block styling with theme support
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user