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

No table support? #1455

Closed
buhtz opened this issue Mar 22, 2024 · 8 comments
Closed

No table support? #1455

buhtz opened this issue Mar 22, 2024 · 8 comments

Comments

@buhtz
Copy link

buhtz commented Mar 22, 2024

Is my diagnosis correct that your package do not support markdown tables?

`>>> markdown.markdown('| table |\n| me |')
'<p>| table |\n| me |</p>'`
@facelessuser
Copy link
Collaborator

You need to use the table extension: https://python-markdown.github.io/extensions/tables/#usage

@buhtz
Copy link
Author

buhtz commented Mar 22, 2024

Ah thanks. Why is this an extension? Technically what is it? Another module (py-file) imported? Why is it separated.

Is there an in-between format while converting? I don't need HTML but the structure.

@facelessuser
Copy link
Collaborator

Python Markdown is an old-school Markdown parser (not CommonMark) based on the original spec. Tables were not included in the original spec, probably because they are clunky, even with such an extension (that is my speculation). It was provided as an extension though. It has become pretty ubiquitous in modern Markdown implementations, but originally, it was an extension and remains so in this library.

@buhtz
Copy link
Author

buhtz commented Mar 22, 2024

Do you see away to get the "in-between format" of a table after parsing it? I need to separate the parsing and the conversion into HTML.

@facelessuser
Copy link
Collaborator

What "in-between format" are you talking about? What format do you think you are trying to get? I'm not sure what you are doing specifically, but I suspect it extends past the scope of what Python Markdown intends to offer.

@buhtz
Copy link
Author

buhtz commented Mar 22, 2024

What "in-between format" are you talking about? What format do you think you are trying to get?

For example a two-dimensional array with all cells.

Thanks in advance

@facelessuser
Copy link
Collaborator

It doesn't have that. If you want that, you'd have to fork the table extension as is and modify it to do what you want it to do. Python Markdown's goal is to convert that syntax to HTML, and that is what it does.

@buhtz
Copy link
Author

buhtz commented Mar 22, 2024

you'd have to fork the table extension as is and modify it to do what you want it to do.

I will consider this. Of course will all respect to your work and your license.

@buhtz buhtz closed this as completed Mar 22, 2024
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