summaryrefslogtreecommitdiff
path: root/src/mfm/parse/elements/big.ts
blob: 8e39c75a558263e8cb534ef489d09257741bfc06 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/**
 * Big
 */

export type TextElementBig = {
	type: 'big'
	content: string
	big: string
};

export default function(text: string) {
	const match = text.match(/^\*\*\*(.+?)\*\*\*/);
	if (!match) return null;
	const big = match[0];
	return {
		type: 'big',
		content: big,
		big: match[1]
	} as TextElementBig;
}