summaryrefslogtreecommitdiff
path: root/src/mfm/parse/elements/quote.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/mfm/parse/elements/quote.ts')
-rw-r--r--src/mfm/parse/elements/quote.ts30
1 files changed, 0 insertions, 30 deletions
diff --git a/src/mfm/parse/elements/quote.ts b/src/mfm/parse/elements/quote.ts
deleted file mode 100644
index 969c1fb4a9..0000000000
--- a/src/mfm/parse/elements/quote.ts
+++ /dev/null
@@ -1,30 +0,0 @@
-/**
- * Quoted text
- */
-
-export type TextElementQuote = {
- type: 'quote';
- content: string;
- quote: string;
-};
-
-export default function(text: string, before: string) {
- const isBegin = before == '';
-
- const match = text.match(/^"([\s\S]+?)\n"/) || text.match(/^\n>([\s\S]+?)(\n\n|$)/) ||
- (isBegin ? text.match(/^>([\s\S]+?)(\n\n|$)/) : null);
-
- if (!match) return null;
-
- const quote = match[1]
- .split('\n')
- .map(line => line.replace(/^>+/g, '').trim())
- .join('\n')
- .trim();
-
- return {
- type: 'quote',
- content: match[0],
- quote: quote,
- } as TextElementQuote;
-}