bs4.Doctype.format_string

Doctype.format_string(s, formatter='minimal')

Format the given string using the given formatter.