diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2018-11-03 22:40:12 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2018-11-03 22:40:12 +0900 |
| commit | 2e22874dec992f262c40d73fe7dfd8e4bad775f2 (patch) | |
| tree | 6722b74e8cccc5566be48ee2897faf4cad349e2c /src/mfm/parse/elements/quote.ts | |
| parent | Add missing semicolons (diff) | |
| download | sharkey-2e22874dec992f262c40d73fe7dfd8e4bad775f2.tar.gz sharkey-2e22874dec992f262c40d73fe7dfd8e4bad775f2.tar.bz2 sharkey-2e22874dec992f262c40d73fe7dfd8e4bad775f2.zip | |
Refactoring
Diffstat (limited to 'src/mfm/parse/elements/quote.ts')
| -rw-r--r-- | src/mfm/parse/elements/quote.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mfm/parse/elements/quote.ts b/src/mfm/parse/elements/quote.ts index 19e86e6305..5f8c9c7fc6 100644 --- a/src/mfm/parse/elements/quote.ts +++ b/src/mfm/parse/elements/quote.ts @@ -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; |