github emdash-cms/emdash @emdash-cms/gutenberg-to-portable-text@1.2.0

Patch Changes

  • #3762 f09797c Thanks @danielmlr! - Fixes WordPress imports turning tables in Classic editor posts into a single paragraph. Tables whose cells hold only text now import as tables, keeping their rows, header row, formatting and links. Tables with images, headings, lists or merged cells, with a caption or footer rows, or inside a <div> or <figure> keep their previous output.

    gutenbergToPortableText() also sets hasHeaderRow: true on tables whose first row holds only <th> cells.

  • #3837 bfd05b0 Thanks @ascorbic! - Fixes WordPress imports failing with "Maximum call stack size exceeded" when a post contains thousands of nested inline tags, such as unclosed <b> or <span> tags. Preformatted, verse, pullquote, and button blocks, and image and gallery captions, no longer fail on this markup either.

    Formatting that is nested inside the same formatting, such as <strong><b>bold</b></strong>, now gives the span a single strong mark instead of repeating it. Text inside a link nested in another link, which HTML only allows inside elements such as <svg> or <object>, now carries only the innermost link.

  • #3893 d1065a1 Thanks @swissky! - Fixes buttons imported from WordPress losing their link. WordPress stores the button link in the block markup, which the converter ignored. Buttons inside a button group now also drop unsafe links such as javascript: URLs, matching single buttons, and a button in a group without a usable link now gets an empty url instead of none.

  • #3792 2881234 Thanks @emdashbot! - Fixes WordPress imports stalling on core/table blocks that contain many unclosed tags, such as thousands of <tr> or <td> tags without a closing tag. Conversion time for this markup grew with the square of its length and now grows linearly. Converted tables are unchanged.

Don't miss a new emdash release

NewReleases is sending notifications on new releases.