""" unwrap_formatter.py This module contains a function `format` that modifies a BeautifulSoup object in place. The `format` function searches for all elements with the attribute "dj-unwrap". For each found element, it removes the element's tags but keeps its content. Example: If an element is
Hello, world!
Hello, world!
. """ from bs4 import BeautifulSoup def format(soup: BeautifulSoup) -> None: for element in soup.find_all(attrs={"dj-unwrap": True}): element.unwrap()