Refactored events to use a small global event bus

This commit is contained in:
Simon Cambier
2022-04-22 22:29:52 +02:00
parent acece86ee3
commit 330df899a0
11 changed files with 104 additions and 58 deletions

View File

@@ -1,3 +1,5 @@
import { EventBus } from './event-bus'
// Matches a wikiling that begins a string
export const regexWikilink = /^!?\[\[(?<name>.+?)(\|(?<alias>.+?))?\]\]/
export const regexLineSplit = /\r?\n|\r|((\.|\?|!)( |\r?\n|\r))/g
@@ -8,6 +10,10 @@ export const excerptAfter = 180
export const highlightClass = 'suggestion-highlight omnisearch-highlight'
export const eventBus = new EventBus()
// export const eventBus = new EventBus()
export type SearchNote = {
path: string
basename: string