Gutenberg

Clean up pasted content into proper Gutenberg blocks

A scenario prompt that untangles a real Google Docs paste-in, with mismatched headings, broken tables, and inherited styles, into clean block markup without touching a single word.

Works with Claude / GPT1,650 uses 4.6

The prompt

clean-up-pasted-content
A client just pasted this into the block editor from Google Docs, and it's a
formatting mess: mismatched heading sizes, random bold on non-headings, an empty
paragraph between every line, and a comparison table that came in as a garbled list.

[paste the raw Google Docs content here, formatting and all]

Restructure this into clean Gutenberg block markup. This is a structure and
formatting fix only. Do not reword, shorten, or "improve" a single sentence, even if
it reads awkwardly. Anything you'd normally flag as unclear, leave exactly as-is.

Work through it in this order:
1. Identify the actual document hierarchy first: what's a real heading versus
   bold-for-emphasis that Docs rendered identically. Docs frequently exports manual
   bold text indistinguishably from real headings, and getting this wrong produces a
   broken heading outline (jumping from H2 straight to H4, for example).
2. Convert tabular content that came through as a broken list back into an actual
   `wp:table` block. Check that row and column alignment still makes sense, since
   paste-ins often silently merge or drop cells.
3. Strip empty paragraphs, inherited inline styles, and Word/Docs-specific artifacts
   (inconsistent curly quotes, non-breaking spaces).
4. Preserve every link exactly. Flag, don't fix, any link that looks broken or points
   to an unrelated domain, since you can't verify it from the text alone.
5. Output the result as WordPress block comment markup (`<!-- wp:paragraph -->` etc.),
   ready to paste directly into the block editor's code view.

Step 1 is the part a naive “convert this to blocks” prompt gets wrong most often. Without explicitly reasoning about hierarchy versus emphasis, models default to making every bolded line an H2, which produces an outline that’s worse than the original mess.

Pro tip: switch the post to the block editor’s code editor view (three-dot menu, then Code editor) before pasting the output in. Pasting block markup into the visual view renders it as literal text instead of blocks.