mirror of
https://activitypub.software/TransFem-org/Sharkey.git
synced 2025-08-21 05:44:48 +00:00
15 lines
251 B
TypeScript
15 lines
251 B
TypeScript
![]() |
/**
|
||
|
* 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(),
|
||
|
};
|
||
|
};
|