MFM: Improve title syntax
This commit is contained in:
parent
d63044a15e
commit
58064ec633
2 changed files with 13 additions and 1 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue