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

List Block: Do not split on line breaks when multiple blocks are transformed #13832

Merged
merged 1 commit into from
Feb 12, 2019

Conversation

ellatrix
Copy link
Member

@ellatrix ellatrix commented Feb 12, 2019

Description

Title should be clear. It doesn't make so much sense to create a list item for every line in a paragraph if multiple paragraphs are transformed. Let's only do that when transforming one.

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/list-transform-br branch from 8bd790f to 3365ffa Compare February 12, 2019 10:09
@gziolo gziolo added this to the 5.1 (Gutenberg) milestone Feb 12, 2019
@gziolo gziolo added [Type] Enhancement A suggestion for improvement. [Block] List Affects the List Block Good First Review A PR that's suitable for someone looking to contribute for the first time by reviewing code labels Feb 12, 2019
Copy link
Member

@jorgefilipecosta jorgefilipecosta left a comment

Choose a reason for hiding this comment

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

LGTM 👍 I verified that if we transform a single paragraph with multiple lines into a list we get multiple list items. If we transform multiple paragraphs into a list we get a list item per paragraph instead of a list item per new line as before.

@ellatrix
Copy link
Member Author

Thanks for the quick review @jorgefilipecosta!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] List Affects the List Block Good First Review A PR that's suitable for someone looking to contribute for the first time by reviewing code [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants