forked from mirrors/misskey
Refactoring
This commit is contained in:
@@ -8,9 +8,9 @@ export type TextElementQuote = {
|
||||
quote: string;
|
||||
};
|
||||
|
||||
export default function(text: string, index: number) {
|
||||
export default function(text: string, isBegin: boolean) {
|
||||
const match = text.match(/^"([\s\S]+?)\n"/) || text.match(/^\n>([\s\S]+?)(\n\n|$)/) ||
|
||||
(index == 0 ? text.match(/^>([\s\S]+?)(\n\n|$)/) : null);
|
||||
(isBegin ? text.match(/^>([\s\S]+?)(\n\n|$)/) : null);
|
||||
|
||||
if (!match) return null;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user