public clean_formatting ( string $xml ) : string | ||
$xml | string | Parsed text |
return | string | Plain text |
public function clean_formatting($xml)
{
// Insert a space before <s> and <e> then remove formatting
$xml = preg_replace('#<[es]>#', ' $0', $xml);
return \s9e\TextFormatter\Utils::removeFormatting($xml);
}