Skip to content

🔩 Enable double-click paragraph selection and copying - #215

Merged
lindsey-pony[bot] merged 5 commits into
mainfrom
feature/double-click-paragraph-copy-20261023
Nov 18, 2026
Merged

lindsey-pony[bot] merged 5 commits into
mainfrom
feature/double-click-paragraph-copy-20261023

Conversation

@JFWooten4

Copy link
Copy Markdown
Member

Summary

  • Double-click text within a PDF paragraph to select its text and immediately copy it to the clipboard.
  • Prefer PDF structure tags when available, with a visual-line fallback for untagged PDFs that respects indentation, line spacing, font-size changes, and adjacent columns.
  • Join visual line wraps into readable paragraph text; respect Copy selection as Markdown and its formatting when enabled.
  • Preserve normal drag selection and existing single-click navigation, use the viewer's clipboard fallback, and display success or error feedback.

Tests

  • Added tests/paragraph-double-click.test.mjs to the npm test script, covering wrapped text, semantic paragraph tags, columns/headings, Markdown formatting, and double-click clipboard behavior.
  • Targeted Node tests passed locally (5/5) against the paragraph grouping logic and equivalent existing copy formatter. Full repository test suite and in-browser behavior have not yet been run.

Note

For untagged PDFs, paragraph boundaries are inferred from text layout and may be approximate in unusually complex scans or multi-column layouts.

JFWooten4 and others added 5 commits October 23, 2026 16:21
Detect semantic or visually wrapped PDF paragraphs, select all their text when double-clicked, and automatically copy them with the existing Markdown setting. Respect column boundaries, preserve ordinary selection, and add focused tests.

Co-authored-by: Codex Web <noreply@openai.com>
…ests

The current base routes tests through scripts/test-suites.mjs, whereas the PR replaces that command with a stale hardcoded Node list. Retain all current suite and syntax checks and add a targeted paragraph test command. The new test remains subject to selection-suite ownership registration; do not weaken or bypass that CI check.
Main already passes both tagged-paragraph and copy-on-select settings into the Markdown-copy installer; the PR starts from the older four-argument call and adds a paragraph double-click listener. Preserve the current five-argument setup, add the listener immediately after it, and retain all other controls, including text-fragment sharing.
@lindsey-pony
lindsey-pony Bot merged commit 1597387 into main Nov 18, 2026
14 checks passed
@lindsey-pony
lindsey-pony Bot deleted the feature/double-click-paragraph-copy-20261023 branch November 18, 2026 23:14
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.

1 participant