MFM: Improve title syntax

This commit is contained in:
syuilo 2018-06-26 18:42:00 +09:00
parent d63044a15e
commit 58064ec633
2 changed files with 13 additions and 1 deletions

View file

@ -9,7 +9,7 @@ export type TextElementTitle = {
};
export default function(text: string) {
const match = text.match(/^【(.+?)】\n/);
const match = text.match(/^(【|\[)(.+?)(】|])\n/);
if (!match) return null;
const title = match[0];
return {