Skip to main content

A Python-Markdown extension to render grid tables

Project description

Markdown grid table extension

PyPI - Version PyPI - Python Version

A Python-Markdown extension to render grid tables.

Example:

+-------------------+------------------+----------------+
| Header 1          | Header 2         | Header 3       |
+===================+==================+================+
| Cells can span multiple columns      | Cells can span |
+--------------------------------------+ multiple rows  |
| Text in cells *can be* **formatted** |                |
|                                      |                |
| > and can contain arbitrary          |                |
| > multi-line blocks                  |                |
+--------------------------------------+----------------+

Installation

pip install markdown-grids

Usage

import markdown
text = ...  # your Markdown source
html = markdown.markdown(text, extensions='grids')

To use with MkDocs, add the following to mkdocs.yml:

markdown_extensions:
  - grids

Because whitespace in a grid table is structural, it is not possible to indicate a newline in a cell with two spaces at the end of the line. Two possible solutions to this are:

Licence

markdown-grids is distributed under the terms of the MIT licence.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

markdown_grids-1.0.0.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

markdown_grids-1.0.0-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file markdown_grids-1.0.0.tar.gz.

File metadata

  • Download URL: markdown_grids-1.0.0.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.25.2

File hashes

Hashes for markdown_grids-1.0.0.tar.gz
Algorithm Hash digest
SHA256 bd1d8472649d528348fc91ff58fbbd68b2d0b0e09a6f3ab154cdd786eaf661e3
MD5 0dc856d46875d95ae8319168419aa61d
BLAKE2b-256 f6a687e316f09cb4044214e5ea34b4d6421e41fb3e90bab2a1ecf2137b5a8072

See more details on using hashes here.

File details

Details for the file markdown_grids-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for markdown_grids-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f45dad17006eab6f9a3f282091cae522a90dc773838f4aea255ca66b73333227
MD5 5889401de9804a31e7e77e4443ebb8d6
BLAKE2b-256 ba5cd81385c1d24fa73ad9d409505d814dbcaeec233c4a5a9fd5ed45e3d422a5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page