Skip to main content

Markdown SmartBreaks

A slightly better nl2br extension for Python Markdown.

Whats different?

  • Won't break for html tags. (e.g. code blocks)

Installation

pip install markdown-smartbreaks

Usage

Markdown module

import markdown
import smartbreaks

data = markdown.markdown(
    md,
    extensions=[
        smartbreaks.SmartBreaksExtension()
    ]
)

MkDocs mkdocs.yml

markdown_extensions:
  - smartbreaks

License

Licensed under the MIT License.

Metadata

Release files for markdown-smartbreaks 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for markdown-smartbreaks 1.0.0
File Size Uploaded
markdown_smartbreaks-1.0.0.tar.gz 2.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for markdown-smartbreaks 1.0.0
File Interpreter ABI Platform
markdown_smartbreaks-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 6.3 kB

Release files / markdown_smartbreaks-1.0.0.tar.gz

Download URL markdown_smartbreaks-1.0.0.tar.gz
Size 2.9 kB
Tags Source
SHA-256 checksum
How to use checksums
d4ab267780065f5c7ac51e5b8c63b88e844992634d11ef0ea9cd3b33960cac36
BLAKE2b-256 checksum
How to use checksums
9269cb26c3b3723a26bd62834a7b5d9b1a4c200aeb5fbab4f1a4678d67abb3a1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.5

Release files / markdown_smartbreaks-1.0.0-py3-none-any.whl

Download URL markdown_smartbreaks-1.0.0-py3-none-any.whl
Size 3.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a34d30ed52c0836ebdf686d5ebff9166f5a3d3dc3b14bb45c048cab8d2f97ed8
BLAKE2b-256 checksum
How to use checksums
ea7abd2489287cecb08d94ffc66d5d584d6f8d883c86ad9a13d08f0f36848b7d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.5

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page