Markdown formatter with configurable line length
Project description
formdt
Markdown formatter with configurable line length.
Installation
uv add formdt
Usage
CLI
# Print formatted output to stdout
formdt README.md
# Write changes back to file
formdt README.md --write
# Override line length
formdt README.md --line-length 120
Library
from formdt import format_markdown, Config
text = "This is a very long line that needs to be wrapped."
config = Config(line_length=40)
formatted = format_markdown(text, config)
Configuration
Create a .formdt file in your project root:
{
"line_length": 80
}
Rules
- Line wrapping: Lines are wrapped at the configured length (default: 80)
- Single line breaks: Joined within paragraphs (markdown treats them as spaces)
- Double line breaks: Preserved as paragraph separators
Development
# Install dependencies
uv sync
# Run tests
uv run pytest
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
formdt-0.1.0.tar.gz
(4.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file formdt-0.1.0.tar.gz.
File metadata
- Download URL: formdt-0.1.0.tar.gz
- Upload date:
- Size: 4.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.9.16 {"installer":{"name":"uv","version":"0.9.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fefcd1c6c626e43f5805ac6e83df1c4fc9ca440254769f4ee2f6b9ae6a412255
|
|
| MD5 |
730c5f783c9659d6dfa4d16048bcc334
|
|
| BLAKE2b-256 |
b02c290c981c7f523d6e0d948c411e94bbf3381451a28e68b65f288f76f048e9
|
File details
Details for the file formdt-0.1.0-py3-none-any.whl.
File metadata
- Download URL: formdt-0.1.0-py3-none-any.whl
- Upload date:
- Size: 3.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.9.16 {"installer":{"name":"uv","version":"0.9.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3a0f8b639bafaea9ff313a9d3b21e6c3e0f227b70a4c73249c2ac5807acfaf1f
|
|
| MD5 |
f05737e4f124707c517074e7f0bc4950
|
|
| BLAKE2b-256 |
ce0e98423c4ad8045bef4948d43e3e58125d0de2c0aff36687a96ae03bec4d50
|