Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Tiny PR] Verse: save line breaks as characters #18372

Merged
merged 2 commits into from
Nov 26, 2019
Merged

Conversation

ellatrix
Copy link
Member

@ellatrix ellatrix commented Nov 7, 2019

Description

Same as #14653, but for verse.
Related: #18099.
Fixes #18364.

This should be the behaviour when using pre, which makes me wonder if we should build it in RichText if the tagName is set to pre. Thoughts? I do like to keep complexity out of RichText, but maybe it just makes more sense.

How has this been tested?

Screenshots

Types of changes

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.

@ellatrix ellatrix force-pushed the try/verse-replace-br branch from 814cd34 to fa86aa4 Compare November 7, 2019 14:10
@mcsf
Copy link
Contributor

mcsf commented Nov 8, 2019

Needs rebase. :)

@ellatrix ellatrix force-pushed the try/verse-replace-br branch from fa86aa4 to e82b89b Compare November 18, 2019 14:37
@ellatrix
Copy link
Member Author

Rebased. :)

Copy link
Contributor

@mcsf mcsf left a comment

Choose a reason for hiding this comment

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

Hm, the changes are interfering with block merges. In the following comparison, I just press Backspace in an empty Paragraph below a Verse:

<br>-separated \n-separated
gut-1 gut-2

@ellatrix
Copy link
Member Author

@mcsf Yes, this problem was noticed in the preformatted block as well, and it's been fixed in #18656. I'll update this PR to use the new prop.

@ellatrix ellatrix force-pushed the try/verse-replace-br branch from e82b89b to ad9fc44 Compare November 25, 2019 14:02
@ellatrix ellatrix changed the title Verse: save line breaks as characters [Tiny PR] Verse: save line breaks as characters Nov 25, 2019
Copy link
Contributor

@mcsf mcsf left a comment

Choose a reason for hiding this comment

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

Thanks!

@ellatrix ellatrix merged commit 5201578 into master Nov 26, 2019
@ellatrix ellatrix deleted the try/verse-replace-br branch November 26, 2019 07:51
@youknowriad youknowriad added this to the Gutenberg 7.1 milestone Dec 9, 2019
@ellatrix ellatrix mentioned this pull request Dec 16, 2019
6 tasks
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.

Verse: Block example should be a single string for translators to handle
3 participants