mdx_spanner
This package enables rowspan and colspan in markdown tables when using MkDocs.
Syntax
Basics (spanning indicators)
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 |
+----------+----------+----------+
Advanced (alignment markers)
You can change the alignment of a single spanned cell by adding markers to the spanning indicators.
To change the horizontal alignment (when multiple columns are merged) put colons before and/or after the ~~ to indicate the alignment:
| Sample | Result |
|---|---|
:~~ |
Left aligned |
:~~: |
Centered |
~~: |
Right aligned |
To change the vertical alignment (when multiple rows are merged) put one of the following chars (`^`,`=`,`_`) between the `__` to indicate the alignment:
| Sample | Result |
|---|---|
_^_ |
Top aligned |
_=_ |
Centered |
___ |
Bottom aligned |
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 2 |
| +----------+
| Value 1 | 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
Metadata
Release files for mdx-spanner 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mdx_spanner-0.1.0.tar.gz | 4.1 kB | Without provenance | Details for mdx_spanner-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mdx_spanner-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for mdx_spanner-0.1.0-py3-none-any.whl |
Total release size: 8.2 kB
Release files / mdx_spanner-0.1.0.tar.gz
| Download URL | mdx_spanner-0.1.0.tar.gz |
|---|---|
| Size | 4.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e72345800a9b867412dc3cb7b1c53dbf2ed327bdaf559917f9107af62eac13b3
|
|
BLAKE2b-256 checksum How to use checksums |
92bcc4785b372c2dd968d4b864bcdf06b6ece3c2cd43a3148e66109a79e74622
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.13.1
|
Release files / mdx_spanner-0.1.0-py3-none-any.whl
| Download URL | mdx_spanner-0.1.0-py3-none-any.whl |
|---|---|
| Size | 4.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
43934ad26924418521fc908968db1611be109577c910a6a8baa6b91b12e9b4fc
|
|
BLAKE2b-256 checksum How to use checksums |
7732f4653b6acac2c7b541e42c903bb106cb4a163775c7e6488c76d3b9bd8f73
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.13.1
|
Security for mdx-spanner 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.