diff --git a/locales/en-US.yml b/locales/en-US.yml index d0a1525994..99b0a7c860 100644 --- a/locales/en-US.yml +++ b/locales/en-US.yml @@ -1806,7 +1806,9 @@ _deck: popRight: "Pop column to the right" profile: "Workspace" newProfile: "New workspace" + renameProfile: "Rename workspace" deleteProfile: "Delete workspace" + nameAlreadyExists: "This workspace name already exists." introduction: "Create the perfect interface for you by arranging columns freely!" introduction2: "Click on the + on the right of the screen to add new colums whenever you want." widgetsIntroduction: "Please select \"Edit widgets\" in the column menu and add a widget." diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index b5c102a655..5bd06f23eb 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -1803,7 +1803,9 @@ _deck: popRight: "右に出す" profile: "ワークスペース" newProfile: "新規ワークスペース" + renameProfile: "ワークスペース名を変更" deleteProfile: "ワークスペースを削除" + nameAlreadyExists: "この名前のワークスペースは既に存在します。" introduction: "カラムを組み合わせて自分だけのインターフェイスを作りましょう!" introduction2: "画面の右にある + を押して、いつでもカラムを追加できます。" widgetsIntroduction: "カラムのメニューから、「ウィジェットの編集」を選択してウィジェットを追加してください" diff --git a/locales/zh-CN.yml b/locales/zh-CN.yml index e891e3d886..2784da81d7 100644 --- a/locales/zh-CN.yml +++ b/locales/zh-CN.yml @@ -1731,7 +1731,9 @@ _deck: popRight: "向右弹出" profile: "配置文件" newProfile: "新建配置文件" + renameProfile: "重命名配置文件" deleteProfile: "删除配置文件" + nameAlreadyExists: "该配置文件名已存在。" introduction: "将各列进行组合以创建您自己的界面!" introduction2: "您可以随时通过屏幕右侧的 + 来添加列" widgetsIntroduction: "从列菜单中,选择“小工具编辑”来添加小工具" diff --git a/locales/zh-TW.yml b/locales/zh-TW.yml index 4471444e98..3e8485adbb 100644 --- a/locales/zh-TW.yml +++ b/locales/zh-TW.yml @@ -1731,7 +1731,9 @@ _deck: popRight: "向右彈出" profile: "個人檔案" newProfile: "新建個人檔案" + renameProfile: "重新命名個人檔案" deleteProfile: "刪除個人檔案" + nameAlreadyExists: "該個人檔案名已經存在。" introduction: "組合欄位來製作屬於自己的介面吧!" introduction2: "您可以隨時透過按畫面右方的 + 來添加欄位。" widgetsIntroduction: "請從欄位的選單中,選擇「編輯小工具」來添加小工具" diff --git a/packages/client/src/components/mfm.ts b/packages/client/src/components/mfm.ts index 169fc7cfe8..6f1b4256dd 100644 --- a/packages/client/src/components/mfm.ts +++ b/packages/client/src/components/mfm.ts @@ -12,7 +12,6 @@ import MkGoogle from "@/components/MkGoogle.vue"; import MkSparkle from "@/components/MkSparkle.vue"; import MkA from "@/components/global/MkA.vue"; import { host } from "@/config"; -import { MFM_TAGS } from "@/scripts/mfm-tags"; import { reducedMotion } from "@/scripts/reduced-motion"; import { defaultStore } from "@/store"; @@ -461,7 +460,7 @@ export default defineComponent({ case "search": { // Disable "search" keyword // (see the issue #9816 on Codeberg) - if (token.props.content.endsWith("search")) { + if (token.props.content.slice(-6).toLowerCase() === "search") { const sentinel = "#"; let ast2 = (isPlain ? mfm.parseSimple : mfm.parse)( token.props.content.slice(0, -6) + sentinel, @@ -473,19 +472,32 @@ export default defineComponent({ ast2[ast2.length - 1].props.text = ast2[ ast2.length - 1 ].props.text.slice(0, -1); + } else { + // I don't think this scope is reachable + console.warn( + "Something went wrong while parsing MFM. Please send a bug report, if possible.", + ); } let prefix = "\n"; if ( index === 0 || - ["blockCode", "mathBlock", "search", "quote"].includes( - ast[index - 1].type, - ) + [ + "blockCode", + "center", + "mathBlock", + "quote", + "search", + ].includes(ast[index - 1].type) ) { prefix = ""; } - return [prefix, ...genEl(ast2), "search\n"]; + return [ + prefix, + ...genEl(ast2), + `${token.props.content.slice(-6)}\n`, + ]; } return [ diff --git a/packages/client/src/ui/deck.vue b/packages/client/src/ui/deck.vue index debf5d0e40..9de91fe562 100644 --- a/packages/client/src/ui/deck.vue +++ b/packages/client/src/ui/deck.vue @@ -70,6 +70,14 @@ > +