Alir3z4 / Alir3z4/html2text

Why not enable `include_sup_sub` by default?

Open
#437 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
2.2k
Forks
296
PR merge metrics
No merged PRs in 30d

Description

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:
```python
import html2text

h = html2text.HTML2Text()
# h.include_sup_sub is False by default
h.handle("0 <= grid[i][j] <= 105")
```
The output will be:
```
`0 <= grid[i][j] <= 105`\n\n
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.