question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Are Markdown Tables supported?

See original GitHub issue

Are 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:

Screen Shot 2021-01-20 at 12 56 29 PM

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:closed
  • Created 3 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
jmaupetitcommented, Jan 21, 2021
1reaction
johnthagencommented, Jan 21, 2021

@jmaupetit Looking at the master branch more closely, this actually is supported

https://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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found