Skip to content

obsidian/functions/prepareSimpleSearch

Mock of Obsidian’s prepareSimpleSearch.

Function Description
prepareSimpleSearch Builds a simple search callback for a query, as Obsidian does. The query is lowercased and split on spaces; every non-empty word must occur in the text, case-insensitively, or the search fails. Every occurrence of every word is a match, and overlapping or touching matches are merged.