summaryrefslogtreecommitdiff
path: root/src/mfm/parse/elements/title.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/mfm/parse/elements/title.ts')
-rw-r--r--src/mfm/parse/elements/title.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mfm/parse/elements/title.ts b/src/mfm/parse/elements/title.ts
index c33485e012..c91ed86e69 100644
--- a/src/mfm/parse/elements/title.ts
+++ b/src/mfm/parse/elements/title.ts
@@ -8,8 +8,8 @@ export type TextElementTitle = {
title: string;
};
-export default function(text: string, i: number) {
- const match = i == 0 ? text.match(/^(【|\[)(.+?)(】|])\n/) : text.match(/^\n(【|\[)(.+?)(】|])\n/);
+export default function(text: string, isBegin: boolean) {
+ const match = isBegin ? text.match(/^(【|\[)(.+?)(】|])\n/) : text.match(/^\n(【|\[)(.+?)(】|])\n/);
if (!match) return null;
const title = match[0];
return {