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.

@mcsf
Copy link
Contributor

@mcsf mcsf commented Nov 8, 2019

Needs rebase. :)

@ellatrix
Copy link
Member Author

@ellatrix ellatrix commented Nov 18, 2019

Rebased. :)

Copy link
Contributor

@mcsf mcsf left a comment

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

@ellatrix ellatrix commented Nov 25, 2019

@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 changed the title Verse: save line breaks as characters [Tiny PR] Verse: save line breaks as characters Nov 25, 2019
mcsf
mcsf approved these changes Nov 25, 2019
Copy link
Contributor

@mcsf mcsf left a comment

Thanks!

@ellatrix ellatrix merged commit 5201578 into master Nov 26, 2019
2 checks passed
@ellatrix ellatrix deleted the try/verse-replace-br branch Nov 26, 2019
@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
Linked issues

Successfully merging this pull request may close these issues.

3 participants