From 3e45ada6b78018cc3fb1435048a8cbfea65c6ccd Mon Sep 17 00:00:00 2001 From: Jeffrey Chen <78434827+TCOTC@users.noreply.github.com> Date: Tue, 31 Dec 2024 08:01:36 +0800 Subject: [PATCH] :art: Support / Menu search based on current language https://github.com/siyuan-note/siyuan/issues/13629 (#13675) --- app/src/protyle/hint/extend.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/app/src/protyle/hint/extend.ts b/app/src/protyle/hint/extend.ts index 199317bd2..fba0aeae1 100644 --- a/app/src/protyle/hint/extend.ts +++ b/app/src/protyle/hint/extend.ts @@ -31,7 +31,7 @@ const getHotkeyOrMarker = (hotkey: string, marker: string) => { export const hintSlash = (key: string, protyle: IProtyle) => { const allList: IHintData[] = [{ - filter: [window.siyuan.languages.template, "moban", "mb", "template", "模板"], + filter: [window.siyuan.languages.template, "moban", "muban", "mb", "template", "模板"], id: "template", value: Constants.ZWSP, html: `
${window.siyuan.languages.template}
`, @@ -80,32 +80,32 @@ export const hintSlash = (key: string, protyle: IProtyle) => { id: "separator_1", html: "separator", }, { - filter: [window.siyuan.languages.heading1, "yijibiaoti", "yjbt", "h1", "heading", "一级标题"], + filter: [window.siyuan.languages.heading1, "yijibiaoti", "yjbt", "h1", "heading1", "一级标题"], id: "heading1", value: "# " + Lute.Caret, html: `
${window.siyuan.languages.heading1}${getHotkeyOrMarker(window.siyuan.config.keymap.editor.heading.heading1.custom, "# ")}
`, }, { - filter: [window.siyuan.languages.heading2, "erjibiaoti", "ejbt", "h2", "heading", "二级标题"], + filter: [window.siyuan.languages.heading2, "erjibiaoti", "ejbt", "h2", "heading2", "二级标题"], id: "heading2", value: "## " + Lute.Caret, html: `
${window.siyuan.languages.heading2}${getHotkeyOrMarker(window.siyuan.config.keymap.editor.heading.heading2.custom, "## ")}
`, }, { - filter: [window.siyuan.languages.heading3, "sanjibiaoti", "sjbt", "h3", "heading", "三级标题"], + filter: [window.siyuan.languages.heading3, "sanjibiaoti", "sjbt", "h3", "heading3", "三级标题"], id: "heading3", value: "### " + Lute.Caret, html: `
${window.siyuan.languages.heading3}${getHotkeyOrMarker(window.siyuan.config.keymap.editor.heading.heading3.custom, "### ")}
`, }, { - filter: [window.siyuan.languages.heading4, "sijibiaoti", "sjbt", "h4", "heading", "四级标题"], + filter: [window.siyuan.languages.heading4, "sijibiaoti", "sjbt", "h4", "heading4", "四级标题"], id: "heading4", value: "#### " + Lute.Caret, html: `
${window.siyuan.languages.heading4}${getHotkeyOrMarker(window.siyuan.config.keymap.editor.heading.heading4.custom, "#### ")}
`, }, { - filter: [window.siyuan.languages.heading5, "wujibiaoti", "wjbt", "h5", "heading", "五级标题"], + filter: [window.siyuan.languages.heading5, "wujibiaoti", "wjbt", "h5", "heading5", "五级标题"], id: "heading5", value: "##### " + Lute.Caret, html: `
${window.siyuan.languages.heading5}${getHotkeyOrMarker(window.siyuan.config.keymap.editor.heading.heading5.custom, "##### ")}
`, }, { - filter: [window.siyuan.languages.heading6, "liujibiaoti", "ljbt", "h6", "heading", "六级标题"], + filter: [window.siyuan.languages.heading6, "liujibiaoti", "ljbt", "h6", "heading6", "六级标题"], id: "heading6", value: "###### " + Lute.Caret, html: `
${window.siyuan.languages.heading6}${getHotkeyOrMarker(window.siyuan.config.keymap.editor.heading.heading6.custom, "###### ")}
`, @@ -214,7 +214,7 @@ export const hintSlash = (key: string, protyle: IProtyle) => { value: "code", html: `
${window.siyuan.languages["inline-code"]}${updateHotkeyTip((window.siyuan.config.keymap.editor.insert["inline-code"].custom))}
`, }, { - filter: [window.siyuan.languages["inline-math"], "hangjigongshi", "hjgs", "inline math", "行级数学公式"], + filter: [window.siyuan.languages["inline-math"], "hangjigongshi", "hjgs", "hangjishuxvegongshi", "hjsxgs", "inline math", "行级公式", "行级数学公式"], id: "inlineMath", value: "inline-math", html: `
${window.siyuan.languages["inline-math"]}${updateHotkeyTip((window.siyuan.config.keymap.editor.insert["inline-math"].custom))}
`,