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