Skip to content

preprocess ¤

HTML pre-processing.

Functions:

  • preprocess

    Pre-process HTML with user-defined functions.

preprocess ¤

preprocess(html: str, module_path: str) -> str

Pre-process HTML with user-defined functions.

Parameters:

  • html (str) –

    The HTML to process before conversion to a manpage.

  • module_path (str) –

    The path of a Python module containing a preprocess function. The function must accept one and only one argument called soup. The soup argument is an instance of bs4.BeautifulSoup.

Returns:

  • str

    The processed HTML.