mirror of
https://github.com/misskey-dev/misskey.git
synced 2025-04-10 14:56:39 +09:00
21 lines
316 B
TypeScript
21 lines
316 B
TypeScript
/**
|
|
* 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;
|
|
}
|