Update doctests to match the old behavior where tags with data-tile are replaced
Simplify replace_content