Metadata-Version: 2.4
Name: mdformat-lists
Version: 0.0.3
Summary: An mdformat plugin to configure bullet characters for unordered lists and markers for ordered lists
Project-URL: Homepage, https://github.com/brendanmaguire/mdformat-lists
Project-URL: Repository, https://github.com/brendanmaguire/mdformat-lists
Author: Brendan Maguire
License-Expression: MIT
License-File: LICENSE
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.10
Requires-Dist: mdformat>=1.0.0
Description-Content-Type: text/markdown

# mdformat-lists

[![Build Status](https://github.com/brendanmaguire/mdformat-lists/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/brendanmaguire/mdformat-lists/actions?query=workflow%3ACI+branch%3Amain+event%3Apush)
[![codecov](https://codecov.io/gh/brendanmaguire/mdformat-lists/branch/main/graph/badge.svg)](https://codecov.io/gh/brendanmaguire/mdformat-lists)
[![PyPI version](https://img.shields.io/pypi/v/mdformat-lists)](https://pypi.org/project/mdformat-lists)
[![PyPI Supported Python Versions](https://img.shields.io/pypi/pyversions/mdformat-lists.svg)](https://pypi.python.org/pypi/mdformat-lists/)

A [mdformat](https://github.com/hukkin/mdformat) plugin to configure list markers for unordered and ordered lists.

By default, mdformat uses `-` as the bullet character (alternating with `*` for consecutive lists) and `.` as the ordered list marker. This plugin allows you to choose between `-`, `*`, and `+` for bullets, and `.` and `)` for ordered list markers.

## Usage

Install with:

```bash
pip install mdformat-lists
```

Then simply run mdformat as usual:

```bash
mdformat <filename>
```

### Configuration

#### Unordered list bullet

Configure the bullet character in `.mdformat.toml`:

```toml
[plugin.lists]
bullet = "*"
```

Or via the command line:

```bash
mdformat --bullet="*" <filename>
```

Valid values are `-` (default), `*`, and `+`.

#### Ordered list marker

Configure the ordered list marker in `.mdformat.toml`:

```toml
[plugin.lists]
ordered_marker = ")"
```

Or via the command line:

```bash
mdformat --ordered-marker=")" <filename>
```

Valid values are `.` (default) and `)`.

When multiple ordered lists appear consecutively, the plugin alternates between the primary and secondary marker (`.` and `)`) to prevent Markdown parsers from merging separate lists into one.

## Contributing

Pull requests are welcome.

### Development

Prerequisites: [mise](https://mise.jdx.dev/)

```bash
git clone https://github.com/brendanmaguire/mdformat-lists.git
cd mdformat-lists
mise trust && mise install
```

Run tasks with `mise`, for example `mise unit-test`.
