Are Markdown Tables supported?
See original GitHub issueAre Extended syntax tables supported? https://www.markdownguide.org/extended-syntax/#tables
Code
if __name__ == "__main__":
table = """
| Syntax | Description |
| ----------- | ----------- |
| Header | Title |
| Paragraph | Text |
"""
output_path = Path("out.pdf")
md2pdf(
output_path,
md_content=f"This is a **test**\n\n{table}",
css_file_path=None,
base_url=None
)
Output
Expecting to see a table here:
Version
Python 3.9.1
$ pip list
Package Version
------------ -------
cairocffi 1.2.0
CairoSVG 2.5.1
cffi 1.14.4
cssselect2 0.4.1
defusedxml 0.6.0
docopt 0.6.2
html5lib 1.1
markdown2 2.3.10
md2pdf 0.4
Pillow 8.1.0
pip 20.3.3
prettytable 2.0.0
pycparser 2.20
Pyphen 0.10.0
setuptools 49.6.0
six 1.15.0
tinycss2 1.1.0
wcwidth 0.2.5
WeasyPrint 52.2
webencodings 0.5.1
wheel 0.35.1
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Extended Syntax - Markdown Guide
To add a table, use three or more hyphens ( --- ) to create each column's header, and use pipes ( | )...
Read more >Tables - Markdown - Codecademy
A table is an arrangement of data in rows and columns. To add a table in Markdown, use the vertical line | to...
Read more >Write Markdown table - format styles align - W3schools.io
Tables are used to represent the data in multidimensional format. Initially, tables are not supported in core markdown specification , Once extended vendors ......
Read more >Working with Tables in GitHub Markdown - Pluralsight
A table in markdown consists of two parts. The header. The rows of data in the table · Individual columns in a table...
Read more >Markdown Tables generator - TablesGenerator.com
Markdown tables support ... As the official Markdown documentation states, Markdown does not provide any special syntax for tables. Instead it uses HTML...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This is now fixed! https://pypi.org/project/md2pdf/0.5/
@jmaupetit Looking at the
master
branch more closely, this actually is supportedhttps://github.com/jmaupetit/md2pdf/blob/b73deee01ffebc08f6883efd52014f7159f8ceee/md2pdf/core.py#L31
But there has not been a released on PyPI in 4 years:
https://pypi.org/project/md2pdf/
Could a new release from
master
be pushed to PyPI? That would close this issue.