Skip to content

Why not enable include_sup_sub by default? #437

@dangne

Description

@dangne

Hi,

I noticed that include_sup_sub is not enabled by default. This can lead to incorrect conversion of math expressions involving exponentiation.

For example, given the following code:

import html2text

h = html2text.HTML2Text()
# h.include_sup_sub is False by default
h.handle("<code>0 &lt;= grid[i][j] &lt;= 10<sup>5</sup></code>")

The output will be:

`0 <= grid[i][j] <= 105`\n\n

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions