Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Assumes first row is always table header even if it is not #387

Open
roniemartinez opened this issue May 25, 2022 · 1 comment
Open

Comments

@roniemartinez
Copy link

The script:

print(
        html2text.html2text(
            """
            <table>
            <tbody>
            <tr><td>item a</td><td>item b</td></tr>
            <tr><td>item c</td><td>item d</td></tr>
            </tbody>
            </table>
            """
        )
    )

Results to:

item a| item b  
---|---  
item c| item d
  • Version by html2text --version: 2020.1.16
  • Test script
  • Python version python --version: Python 3.10.2
LEv145 added a commit to LEv145/html2text that referenced this issue Jul 18, 2024
Header row is removed by default
The header string is created only when the `th` tag has been found
@LEv145
Copy link

LEv145 commented Jul 18, 2024

Maybe this will fix the problem
master...LEv145:html2text:master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants