SIGN IN SIGN UP

fix(rewrite): keep content order when remove_tables unwraps tables

The remove_tables rule unwrapped each table element by appending its
inner HTML to the end of the parent node and then removing the element.
Any content located after the table (and the table content itself) was
therefore moved to the bottom of the entry instead of staying in place,
which reordered the article.

Replace the append-then-remove with an in-place ReplaceWithHtml so the
unwrapped content keeps its original document order. The existing
TestRewriteRemoveTables still passes because its content is fully nested
in a single root table; a new test with content surrounding the table
covers the regression.

Fixes #3110

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
T
TowyTowy committed
cf5ae57d9a65b24394104fa12428a48ca5236a8d
Parent: 070bc9e
Committed by fguillot <323546+fguillot@users.noreply.github.com> on 7/13/2026, 3:47:37 AM