Skip to content

Bug: Shift+Enter no longer splits inline formatting (e.g., **text**) #185

Closed

Description

@malibio

Description

When pressing Shift+Enter within inline formatted text (e.g., **bold text**), the text splitting behavior has regressed. Previously, pressing Shift+Enter in the middle of a word would split the word while preserving the markdown syntax on both lines. Now it moves the entire word (with syntax) to the next line.

Expected Behavior

Pressing Shift+Enter in the middle of **bol|d** (where | is cursor) should produce:

**bol**
**d**

Actual Behavior

Pressing Shift+Enter in the middle of **bol|d** now produces:

**
bold**

or similar incorrect splitting.

Root Cause

The Shift+Enter handler in contentEditableController.ts:1111-1119 allows default browser behavior without applying markdown-aware splitting logic from markdownSplitter.ts.

Test Coverage Gap

Despite having a comprehensive markdownSplitter.ts utility with proper splitting logic, there are no tests verifying that Shift+Enter actually uses this splitting logic for inline formatted text.

Acceptance Criteria

  • Shift+Enter within inline formatted text splits at cursor position
  • Both lines preserve markdown syntax (closing on first line, opening on second)
  • Works for all inline formats: bold, italic, code, strikethrough
  • Add comprehensive tests for Shift+Enter with inline formatting
  • Verify cursor positioning after split

Activity

  1. added
    bug
    on Oct 8, 2025
  2. self-assigned this
    on Oct 8, 2025
  3. added 3 commits that reference this issue on Oct 8, 2025
    481d099
    eb27a0e
    c7dd844
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugfoundation

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions