Skip to content

Commit

Permalink
Fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ellatrix committed Jun 3, 2023
1 parent d93a95f commit 8cee001
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/reference-guides/core-blocks.md
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ Add a link to a downloadable file. ([Source](https://github.com/WordPress/gutenb

- **Name:** core/footnotes
- **Category:** text
- **Supports:** ~~html~~, ~~multiple~~
- **Supports:** ~~html~~, ~~inserter~~, ~~multiple~~, ~~reusable~~
- **Attributes:**

## Classic
Expand Down
2 changes: 2 additions & 0 deletions packages/block-editor/src/private-apis.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
*/
import * as globalStyles from './components/global-styles';
import { ExperimentalBlockEditorProvider } from './components/provider';
import { getRichTextValues } from './components/rich-text';
import { lock } from './lock-unlock';

/**
Expand All @@ -12,4 +13,5 @@ export const privateApis = {};
lock( privateApis, {
...globalStyles,
ExperimentalBlockEditorProvider,
getRichTextValues,
} );
6 changes: 4 additions & 2 deletions packages/block-library/src/footnotes/block.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 2,
"apiVersion": 3,
"name": "core/footnotes",
"title": "Footnotes",
"category": "text",
Expand All @@ -10,7 +10,9 @@
"usesContext": [ "postId", "postType" ],
"supports": {
"html": false,
"multiple": false
"multiple": false,
"inserter": false,
"reusable": false
},
"style": "wp-block-footnotes"
}
2 changes: 2 additions & 0 deletions packages/core-data/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,14 @@
"references": [
{ "path": "../api-fetch" },
{ "path": "../compose" },
{ "path": "../block-editor" },
{ "path": "../data" },
{ "path": "../deprecated" },
{ "path": "../element" },
{ "path": "../html-entities" },
{ "path": "../i18n" },
{ "path": "../is-shallow-equal" },
{ "path": "../private-apis" },
{ "path": "../url" }
],
"include": [ "src/**/*" ]
Expand Down
4 changes: 2 additions & 2 deletions packages/rich-text/src/create.js
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ function createFromElement( {
attributes: getAttributes( { element: node } ),
} );

if ( format.formatType?.contentEditable === false ) {
if ( format?.formatType?.contentEditable === false ) {
delete format.formatType;
accumulateSelection( accumulator, node, range, createEmptyValue() );
mergePair( accumulator, {
Expand All @@ -440,7 +440,7 @@ function createFromElement( {
continue;
}

delete format.formatType;
if ( format ) delete format.formatType;

if (
multilineWrapperTags &&
Expand Down

0 comments on commit 8cee001

Please sign in to comment.