Skip to content

Resolved an issue where extra whitespace was added when copying field tags - #5458

Merged
bryannielsen merged 1 commit into
7.devfrom
fix/trim-copied-field-tags
Nov 16, 2026
Merged

bryannielsen merged 1 commit into
7.devfrom
fix/trim-copied-field-tags

Conversation

@TomJaeger

Copy link
Copy Markdown
Contributor

Copying a generated field tag such as {home_page} includes indentation and a trailing newline from template generation. Trim surrounding whitespace before writing the snippet to the clipboard so it pastes cleanly, while preserving indentation, blank lines, and line breaks inside channel loops and other multiline snippets.

Tighten the existing date, email, and URL field clipboard assertions to compare exact text rather than ignore whitespace.

Validation:

  • Focused checks through the actual copy handler reproduced the bug before the change and passed afterward for PHP-rendered date, email, and URL field snippets.
  • A PHP-rendered channel loop remained identical after copying; a multiline snippet retained its internal indentation and blank lines, and direct field-name copying still worked.
  • JavaScript syntax checks and git diff --check passed. Separate reviewer found no actionable issues.
  • Full Cypress/Electron suite was not run.

@TomJaeger TomJaeger added the Bug: Accepted Bug has been confirmed, is reproducible, and ready to work on. label Nov 9, 2026
@TomJaeger TomJaeger added this to the 7.5.29 milestone Nov 9, 2026
@bryannielsen bryannielsen changed the title Fixed extra whitespace when copying field tags Resolved an issue where extra whitespace was added when copying field tags Nov 12, 2026
@bryannielsen
bryannielsen merged commit 204edca into 7.dev Nov 16, 2026
24 checks passed
@bryannielsen
bryannielsen deleted the fix/trim-copied-field-tags branch November 16, 2026 19:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug: Accepted Bug has been confirmed, is reproducible, and ready to work on.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Sponsor
SponsoredKunjungi sekarang
Promo