Skip to content

Commit 28b8a19

Browse files
committed
feat(quote): add multi-level quote support with depth handling
- Implement nested quote blocks with depth levels (1-5) - Combine sequential quotes with same depth into single block - Add depth adjustment via keyboard shortcuts - Improve quote styling with minimal visual indicators - Update markdown parsing/serialization for depth support
1 parent 4fb4a45 commit 28b8a19

File tree

3 files changed

+280
-88
lines changed

3 files changed

+280
-88
lines changed

components/editor/core/EditorCore.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,12 +247,15 @@ export const EditorCore = forwardRef<ExtendedMarkdownEditorRef, ExtendedMarkdown
247247

248248
// Check for quote pattern (> text) - single line only
249249
if (!isMultiline) {
250-
const quoteMatch = content.match(/^>\s+(.+)$/);
250+
const quoteMatch = content.match(/^(>+)\s*(.*)$/);
251251
if (quoteMatch) {
252+
const depth = quoteMatch[1].length;
253+
const quoteContent = quoteMatch[2];
252254
return {
253255
...updates,
254256
type: 'quote',
255-
content: quoteMatch[1]
257+
content: quoteContent,
258+
meta: { depth }
256259
};
257260
}
258261
}

0 commit comments

Comments
 (0)