diff --git a/docs/reference-guides/core-blocks.md b/docs/reference-guides/core-blocks.md index f5285fa8149ac..db5f3a5e779ba 100644 --- a/docs/reference-guides/core-blocks.md +++ b/docs/reference-guides/core-blocks.md @@ -788,7 +788,7 @@ Summarize your post with a list of headings. Add HTML anchors to Heading blocks - **Name:** core/table-of-contents - **Category:** layout -- **Supports:** ~~html~~ +- **Supports:** spacing (margin, padding), ~~html~~ - **Attributes:** headings, onlyIncludeCurrentPage ## Tag Cloud diff --git a/packages/block-library/src/table-of-contents/block.json b/packages/block-library/src/table-of-contents/block.json index f846334f402ef..b305cb3242683 100644 --- a/packages/block-library/src/table-of-contents/block.json +++ b/packages/block-library/src/table-of-contents/block.json @@ -21,7 +21,11 @@ } }, "supports": { - "html": false + "html": false, + "spacing": { + "margin": true, + "padding": true + } }, "example": {} } diff --git a/packages/e2e-tests/specs/site-editor/global-styles-sidebar.test.js b/packages/e2e-tests/specs/site-editor/global-styles-sidebar.test.js index 36b615d202926..bcc81670ce8f0 100644 --- a/packages/e2e-tests/specs/site-editor/global-styles-sidebar.test.js +++ b/packages/e2e-tests/specs/site-editor/global-styles-sidebar.test.js @@ -36,7 +36,8 @@ describe( 'Global styles sidebar', () => { const results = await page.$$( '.edit-site-block-types-item-list div[role="listitem"]' ); - expect( results.length ).toEqual( 1 ); + // Matches both Heading and Table of Contents blocks. (The latter contains "heading" in its description.) + expect( results.length ).toEqual( 2 ); } ); } ); } );