Skip to content

[codex] Add blockquote continuation - #93

Open
bendsp wants to merge 2 commits into
codex/editor-quality-passfrom
codex/feature-blockquote-continuation
Open

[codex] Add blockquote continuation#93
bendsp wants to merge 2 commits into
codex/editor-quality-passfrom
codex/feature-blockquote-continuation

Conversation

@bendsp

@bendsp bendsp commented May 9, 2026

Copy link
Copy Markdown
Owner

Summary

  • continue Markdown blockquotes when pressing Enter inside a quote line
  • exit an empty blockquote line by removing its marker
  • cover continuation, exit, and non-quote fallthrough behavior with unit tests

Validation

  • pnpm lint
  • pnpm typecheck
  • pnpm test:unit

Copilot AI review requested due to automatic review settings May 9, 2026 14:28

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ba4bdad6f0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

}

const line = view.state.doc.lineAt(from);
const match = line.text.match(/^(\s*>+\s?)(.*)$/);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve spaced nested quote markers on Enter

Update the blockquote marker match so it captures the full quote prefix for spaced nesting (for example > > ), not just contiguous > characters. With the current regex, a line like > > nested is parsed as marker > plus content > nested, so pressing Enter inserts only a single-level > on the new line and silently drops one nesting level. This regresses continuation behavior for valid Markdown blockquote syntax commonly found in existing documents.

Useful? React with 👍 / 👎.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds Markdown blockquote continuation behavior to the CodeMirror editor so pressing Enter inside a blockquote line continues the quote, and pressing Enter on an empty quote line exits the blockquote.

Changes:

  • Introduces continueBlockquoteCommand to continue or exit blockquotes on Enter.
  • Wires the command into the base CodeMirror keymap for the Enter key.
  • Adds unit tests covering continuation, exit, and non-blockquote fallthrough behavior.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
tests/controllerShortcuts.test.ts Adds unit tests for Enter-based blockquote continuation/exit behavior.
src/renderer/editor/codemirror/extensions.ts Registers the new Enter keybinding in the base keymap.
src/renderer/editor/codemirror/commands.ts Implements the continueBlockquoteCommand command logic.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

}

const line = view.state.doc.lineAt(from);
const match = line.text.match(/^(\s*>+\s?)(.*)$/);
Comment on lines +491 to +495
const line = view.state.doc.lineAt(from);
const match = line.text.match(/^(\s*>+\s?)(.*)$/);
if (!match) {
return false;
}
(): import("@codemirror/view").KeyBinding[] => [
{
key: "Enter",
run: continueBlockquoteCommand,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants