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

ToC block: handle newlines #41203

Closed
simison opened this issue May 20, 2022 · 0 comments · Fixed by #41206
Closed

ToC block: handle newlines #41203

simison opened this issue May 20, 2022 · 0 comments · Fixed by #41206
Assignees
Labels
[Block] Table of contents (experimental) Affects the Table of contents Block [Type] Bug An existing feature does not function as intended

Comments

@simison
Copy link
Member

simison commented May 20, 2022

Description

Heading blocks can contain newlines (shift+enter) but ToC block won't show them:

Screenshot 2022-05-20 at 17 16 17

Step-by-step reproduction instructions

  1. Add Table of Contents block
  2. Add heading block
  3. Enter text, create new line within heading (shift+enter), and enter more text
  4. See how ToC block doesn't contain the newline

Screenshots, screen recording, code snippet

I got around the problem by adding a space before newline:

Screenshot 2022-05-20 at 17 16 24

Environment info

  • Gutenberg: v13.3.0-rc.1

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

No

FYI @ZebulanStanphill

@simison simison added the [Block] Table of contents (experimental) Affects the Table of contents Block label May 20, 2022
@ZebulanStanphill ZebulanStanphill added the [Type] Bug An existing feature does not function as intended label May 20, 2022
@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label May 20, 2022
@priethor priethor removed the [Status] In Progress Tracking issues with work in progress label May 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Table of contents (experimental) Affects the Table of contents Block [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants