blob: cc8cfffdc4b7568b19581b30fcb3a76687e542b9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
/**
* Quoted text
*/
module.exports = text => {
const match = text.match(/^"([\s\S]+?)\n"/);
if (!match) return null;
const quote = match[0];
return {
type: 'quote',
content: quote,
quote: quote.substr(1, quote.length - 2).trim(),
};
};
|