Skip to content

[BUG] Pagination algorithm causes content overflow in reader mode #26

@DeepanshKhurana

Description

@DeepanshKhurana

Bug Report

Describe the bug
The pagination algorithm uses line-based estimation that compounds errors across content blocks. Content frequently overflows the column height or gets cut off mid-sentence.

To Reproduce

  1. Create a piece with mixed content (paragraphs, blockquotes, lists)
  2. Open in reader mode with 2-column layout
  3. Observe content being cut off at column boundaries or overflowing

Expected behavior
Content should fit within column boundaries without overflow or cutoff.

Screenshots
N/A

Additional context
The line-based approach estimates lines per block using character counts divided by average characters per line, but this compounds errors because:

  • Markdown formatting (bold, italic) affects rendered width unpredictably
  • Blockquotes and lists have different effective widths
  • Per-sentence line buffers add cumulative overhead
  • No mechanism to split blocks mid-content when they exceed remaining space

Metadata

Metadata

Labels

bugSomething isn't working

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions