diff --git a/app/src/search/util.ts b/app/src/search/util.ts index 130680a84..644949581 100644 --- a/app/src/search/util.ts +++ b/app/src/search/util.ts @@ -16,6 +16,7 @@ import {onGet} from "../protyle/util/onGet"; import {addLoading, setPadding} from "../protyle/ui/initUI"; import {getIconByType} from "../editor/getIcon"; import {unicode2Emoji} from "../emoji"; +import {Dialog} from "../dialog"; export const openGlobalSearch = (text: string, replace: boolean) => { text = text.trim(); @@ -86,6 +87,16 @@ export const genSearch = (config: ISearchOption, element: Element, closeCB?: () } else if (config.method === 3) { methodText = window.siyuan.languages.regex; } + let includeChild = true; + let enableIncludeChild = false; + config.idPath.forEach(item => { + if (!item.endsWith(".sy") && item.split("/").length > 1) { + includeChild = false; + } + if (item.split("/").length > 1) { + enableIncludeChild = true; + } + }); element.innerHTML = `