Grouping in-file results when matches are close enough in the text

This commit is contained in:
Simon Cambier
2022-04-18 16:22:02 +02:00
parent 3168a89070
commit 41203a11da
4 changed files with 45 additions and 12 deletions

View File

@@ -1,10 +1,10 @@
import type { SearchResult } from 'minisearch'
// Matches a wikiling that begins a string
export const regexWikilink = /^!?\[\[(?<name>.+?)(\|(?<alias>.+?))?\]\]/
export const regexLineSplit = /\r?\n|\r|((\.|\?|!)( |\r?\n|\r))/g
export const regexYaml = /^---\s*\n(.*?)\n?^---\s?/ms
export const surroundLen = 180
export type SearchNote = {
path: string
basename: string