# Markdown SmartBreaks
A slightly better `nl2br` extension for Python Markdown.
## Whats different?
- Won't break for html tags. (e.g. code blocks)
## Installation
``` bash
pip install markdown-smartbreaks
```
## Usage
### Markdown module
``` python
import markdown
import smartbreaks
data = markdown.markdown(
md,
extensions=[
smartbreaks.SmartBreaksExtension()
]
)
```
### MkDocs `mkdocs.yml`
``` yaml
markdown_extensions:
- smartbreaks
```
## License
Licensed under the MIT License.
Raw data
{
"_id": null,
"home_page": "https://github.com/zetaloop/markdown_smartbreaks",
"name": "markdown-smartbreaks",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "markdown nl2br breaks",
"author": "zetaloop",
"author_email": "zetaloop@outlook.com",
"download_url": "https://files.pythonhosted.org/packages/92/69/cb26c3b3723a26bd62834a7b5d9b1a4c200aeb5fbab4f1a4678d67abb3a1/markdown_smartbreaks-1.0.0.tar.gz",
"platform": null,
"description": "# Markdown SmartBreaks\r\n\r\nA slightly better `nl2br` extension for Python Markdown.\r\n\r\n## Whats different?\r\n- Won't break for html tags. (e.g. code blocks)\r\n\r\n## Installation\r\n\r\n``` bash\r\npip install markdown-smartbreaks\r\n```\r\n\r\n## Usage\r\n\r\n### Markdown module\r\n``` python\r\nimport markdown\r\nimport smartbreaks\r\n\r\ndata = markdown.markdown(\r\n md,\r\n extensions=[\r\n smartbreaks.SmartBreaksExtension()\r\n ]\r\n)\r\n```\r\n\r\n### MkDocs `mkdocs.yml`\r\n``` yaml\r\nmarkdown_extensions:\r\n - smartbreaks\r\n```\r\n\r\n## License\r\n\r\nLicensed under the MIT License.\r\n",
"bugtrack_url": null,
"license": "MIT",
"summary": null,
"version": "1.0.0",
"project_urls": {
"Homepage": "https://github.com/zetaloop/markdown_smartbreaks"
},
"split_keywords": [
"markdown",
"nl2br",
"breaks"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "ea7abd2489287cecb08d94ffc66d5d584d6f8d883c86ad9a13d08f0f36848b7d",
"md5": "9b91942ac804f3e50863c5f82c925bce",
"sha256": "a34d30ed52c0836ebdf686d5ebff9166f5a3d3dc3b14bb45c048cab8d2f97ed8"
},
"downloads": -1,
"filename": "markdown_smartbreaks-1.0.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "9b91942ac804f3e50863c5f82c925bce",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 3325,
"upload_time": "2024-09-10T06:39:39",
"upload_time_iso_8601": "2024-09-10T06:39:39.562725Z",
"url": "https://files.pythonhosted.org/packages/ea/7a/bd2489287cecb08d94ffc66d5d584d6f8d883c86ad9a13d08f0f36848b7d/markdown_smartbreaks-1.0.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "9269cb26c3b3723a26bd62834a7b5d9b1a4c200aeb5fbab4f1a4678d67abb3a1",
"md5": "849bd35cbb32e9be8009d68b0276276e",
"sha256": "d4ab267780065f5c7ac51e5b8c63b88e844992634d11ef0ea9cd3b33960cac36"
},
"downloads": -1,
"filename": "markdown_smartbreaks-1.0.0.tar.gz",
"has_sig": false,
"md5_digest": "849bd35cbb32e9be8009d68b0276276e",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 2926,
"upload_time": "2024-09-10T06:39:40",
"upload_time_iso_8601": "2024-09-10T06:39:40.838778Z",
"url": "https://files.pythonhosted.org/packages/92/69/cb26c3b3723a26bd62834a7b5d9b1a4c200aeb5fbab4f1a4678d67abb3a1/markdown_smartbreaks-1.0.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-09-10 06:39:40",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "zetaloop",
"github_project": "markdown_smartbreaks",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "markdown-smartbreaks"
}