-
-
-
-
-
-
-
-
-
diff --git a/fe_calckey/frontend/client/src/components/mfm.ts b/fe_calckey/frontend/client/src/components/mfm.ts
index cb0942a..3d2e393 100644
--- a/fe_calckey/frontend/client/src/components/mfm.ts
+++ b/fe_calckey/frontend/client/src/components/mfm.ts
@@ -8,7 +8,6 @@ import MkEmoji from "@/components/global/MkEmoji.vue";
import { concat } from "@/scripts/array";
import MkFormula from "@/components/MkFormula.vue";
import MkCode from "@/components/MkCode.vue";
-import MkGoogle from "@/components/MkGoogle.vue";
import MkSparkle from "@/components/MkSparkle.vue";
import MkA from "@/components/global/MkA.vue";
import { host } from "@/config";
@@ -494,53 +493,35 @@ export default defineComponent({
}
case "search": {
- // Disable "search" keyword
- // (see the issue #9816 on Codeberg)
- if (token.props.content.slice(-6).toLowerCase() === "search") {
- const sentinel = "#";
- let ast2 = (isPlain ? mfm.parseSimple : mfm.parse)(
- token.props.content.slice(0, -6) + sentinel,
- );
- if (
- ast2[ast2.length - 1].type === "text" &&
- ast2[ast2.length - 1].props.text.endsWith(sentinel)
- ) {
- 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",
- "center",
- "mathBlock",
- "quote",
- "search",
- ].includes(ast[index - 1].type)
- ) {
- prefix = "";
- }
+ const sentinel = "#";
+ let ast2 = (isPlain ? mfm.parseSimple : mfm.parse)(
+ token.props.content + sentinel,
+ );
+ if (
+ ast2[ast2.length - 1].type === "text" &&
+ ast2[ast2.length - 1].props.text.endsWith(sentinel)
+ ) {
+ ast2[ast2.length - 1].props.text = ast2[ast2.length - 1].props.text.slice(0, -1);
+ }
- return [
- prefix,
- ...genEl(ast2),
- `${token.props.content.slice(-6)}\n`,
- ];
+ let prefix = "\n";
+ if (
+ index === 0 ||
+ [
+ "blockCode",
+ "center",
+ "mathBlock",
+ "quote",
+ "search",
+ ].includes(ast[index - 1].type)
+ ) {
+ prefix = "";
}
return [
- h(MkGoogle, {
- key: Math.random(),
- q: token.props.query,
- }),
+ prefix,
+ ...genEl(ast2)
];
}