test(gutenberg-to-portable-text): add transform tests (#332)
* test(gutenberg-to-portable-text): add transform tests This adds a bunch of tests, mostly for the transformers but also some minor edge cases in the inline parser, too. It also enables `noUnusedLocals` in `tsconfig.json` which caught a couple of unused things. * chore: add domain to each * style: format * chore: remove some figures --------- Co-authored-by: emdashbot[bot] <emdashbot[bot]@users.noreply.github.com>
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
import { parse } from "@wordpress/block-serialization-default-parser";
|
||||
|
||||
import { parseInlineContent } from "./inline.js";
|
||||
import { getTransformer, defaultTransformers, fallbackTransformer } from "./transformers/index.js";
|
||||
import { getTransformer } from "./transformers/index.js";
|
||||
import type {
|
||||
GutenbergBlock,
|
||||
PortableTextBlock,
|
||||
|
||||
@@ -550,8 +550,6 @@ export const group: BlockTransformer = (block, _options, context) => {
|
||||
* core/table → table block
|
||||
*/
|
||||
export const table: BlockTransformer = (block, _options, context) => {
|
||||
const _hasFixedLayout = attrBoolean(block.attrs, "hasFixedLayout");
|
||||
|
||||
// Parse the table HTML
|
||||
const tableMatch = block.innerHTML.match(TABLE_TAG_PATTERN);
|
||||
if (!tableMatch) {
|
||||
|
||||
Reference in New Issue
Block a user