Skip to main content

Span table cols and rows in MkDocs

Project description

mdx_spanner

This package enables rowspan and colspan in markdown tables when using MkDocs.

Syntax

You can activate colspan by putting only ~~ in a cell. This will merge the cell with the cell in the previous column.

You can activate rowspan by putting __ in a cell. This will merge the cell with the cell in the previous row. If the cell in previous row is empty it will continue to merge until it finds a non-empty cell.

Sample:

| Header 1 | Header 2 | Header 3 |
| ---------| -------- | -------- |
| Value 1  |    ~~    | Value 2  |
|          |    ~~    | Value 3  |
|_        _|    ~~    | Value 5  |
| Value 6  | Value 7  | Value 8  |

This should result in the following table:

+----------+----------+----------+
| Header 1 | Header 2 | Header 3 |
+----------+----------+----------+
| Value 1             | Value 2  |
|                     +----------+
|                     | Value 3  |
|                     +----------+
|                     | Value 5  |
+----------+----------+----------+
| Value 6  | Value 7  | Value 8  |
+----------+----------+----------+

Install

$ pip install mdx_spanner

Usage

After installing the extension you can add it in the mkdocs.yml file:

site_name: ...
nav:
  ...
theme:
  ...
markdown_extensions:
  - mdx_spanner

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

mdx_spanner-0.0.3.tar.gz (2.9 kB view details)

Uploaded Source

Built Distribution

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

mdx_spanner-0.0.3-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

Details for the file mdx_spanner-0.0.3.tar.gz.

File metadata

  • Download URL: mdx_spanner-0.0.3.tar.gz
  • Upload date:
  • Size: 2.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2

File hashes

Hashes for mdx_spanner-0.0.3.tar.gz
Algorithm Hash digest
SHA256 09f41087492d8637dd3a102ce86447e831e0a3bc52f7a519082f15ffdfd27f92
MD5 93575527655bdf9901d4348dff143ce0
BLAKE2b-256 f85470d8d6d3bc9e3e6e3f88db5dfb64928d4f2f9ca109ddefeee54a2a60b20f

See more details on using hashes here.

File details

Details for the file mdx_spanner-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: mdx_spanner-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 3.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2

File hashes

Hashes for mdx_spanner-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 1b5b172ccf33e2e1658386acad6ca1d94238b341d2b47847bf8156f41458b834
MD5 7c6932f9c79384abb138d7e3d13bd5c0
BLAKE2b-256 648502a5665955091e1634c06aee830404ea5868d1784a5690287954347ca1aa

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