diff options
Diffstat (limited to 'src/text/parse/elements/bold.ts')
| -rw-r--r-- | src/text/parse/elements/bold.ts | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/text/parse/elements/bold.ts b/src/text/parse/elements/bold.ts index ce25764457..0566ace8b7 100644 --- a/src/text/parse/elements/bold.ts +++ b/src/text/parse/elements/bold.ts @@ -2,7 +2,13 @@ * Bold */ -module.exports = text => { +export type TextElementBold = { + type: "bold" + content: string + bold: string +}; + +export default function(text: string) { const match = text.match(/^\*\*(.+?)\*\*/); if (!match) return null; const bold = match[0]; @@ -10,5 +16,5 @@ module.exports = text => { type: 'bold', content: bold, bold: bold.substr(2, bold.length - 4) - }; -}; + } as TextElementBold; +} |