Skip to content

Repository files navigation

Multiline Table extension for Python Markdown

This project extends the Python markdown implementation with multiline table support.

md multiline table

A good starting point is the documentation published on the GitHub Pages. The following information and instructions in this README are mostly aimed at developers and contributors.

Repository Structure

The repository is organized as follows:

Requirements

  • Python 3.11 or later

  • uv (highly recommended)

    # Linux and macOS
    curl -LsSf https://astral.sh/uv/install.sh | sh
    # Windows PowerShell
    powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"

Install

There are multiple optional dependencies available:

  • dev: installs additional development tools
  • test: installs test requirements
  • stubs: installs further type information
  • docs: installs documentation requirements
  • all: installs all optional dependencies

Of course, it is possible to install the software without any additional optional dependencies. Choose your poison based on your own requirements.

# update uv (optional)
uv self update

# create and install or update virtual environment with its dependencies
uv sync --all-groups

# activate the virtual environment (optional)
source .venv/bin/activate   # Linux and macOS
.venv\Scripts\activate.ps1  # Windows

# enable git pre-commit hooks (optional)
uv run prek install

Usage

markdown package

from markdown import markdown
from md_multiline_table import MultilineTableExtension

html = markdown(text, extensions=[MultilineTableExtension()])

mkdocs

Just add md-multiline-table inside the markdown_extensions of your mkdocs.yml file.

markdown_extensions:
  - md-multiline-table

Testing

This projects provides a few different tests and checks.

Note

For detailed information about the tests, please check out the Testing section in the documentation.

In general, we have two files which defines all the tests:

To easily run these tests locally, use:

./scripts/test.sh

If you only want to run the pre-commit hooks manually, use:

uv run prek run --all-files 

Contribution

Please follow the contribution rules:

  • use typed Python (type annotations)
  • verify Python static code checks with ruff
  • write tests
  • document fixes, enhancements, new features, ...
  • write scripts and examples OS independent or at least with linux, wsl support
  • verify shell script static code check compliance with ShellCheck
  • verify REUSE Specification 3.0 compliance for all files
  • verify project license compliance without any license conflicts (e.g. for 3rd party libraries, data, models, ...)
  • verify documentation (markdown) compliance w.r.t. markdown linting rules further specified inside the .markdownlint-cli2.jsonc configuration file
  • run all tests successfully

Documentation

This projects is using the Docstring style from Google. At least public classes, methods, fields, ... should be documented.

For further documentation we are using Markdown documentation with Material for MkDocs. See the docs folder for more details.

To locally serve the documentation, feel free to use:

uv run mkdocs serve

Contributors

Florian Heinrich

Citation

For accurate citation, refer to the corresponding metadata in the CITATION.cff file associated with this work.

License

Please see the file LICENSE.md for further information about how the content is licensed.

About

Multiline Table extension for Python Markdown

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Used by

Contributors

Languages