Python bindings for Rust crate md-ulb-pwrap.
Project description
md-ulb-pwrap
Markdown paragraph wrapper using Unicode Line Breaking Algorithm.
Wrap a Markdown paragraph using a maximum desired width. Only works for paragraphs that don't contain other container blocks. Respects the prohibition against wrapping text inside inline code blocks and links.
Usage
pip install md-ulb-pwrap
from md_ulb_pwrap import ulb_wrap_paragraph
markdown = "aaa ``` `` ` a b c ``` ccc"
expected_result = "aaa\n``` `` ` a b c ```\nccc"
assert ulb_wrap_paragraph(markdown, 3, 3) == expected_result
Reference
ulb_wrap_paragraph(text: str, width: int, first_line_width: int) -> str
- text (str): The text to wrap.
- width (int): The maximum width of the lines after the first.
- first_line_width (int): The maximum width of the first line.
Returns (str): The wrapped text.
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
md_ulb_pwrap-0.1.1.tar.gz
(10.6 kB
view hashes)
Built Distributions
Close
Hashes for md_ulb_pwrap-0.1.1-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 61c6de423c97c8723cd8e00f3223c3b3ef03559b2688e8f456a96f0a91398fb5 |
|
MD5 | d4db93ba7df86563ad342c54757e88d6 |
|
BLAKE2b-256 | 025f7cd280a2286546076fbd1760cc7fe173f1a22f5ea3bf0e332d591e36d8a2 |
Close
Hashes for md_ulb_pwrap-0.1.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 883a808f15b0b4d8a9d14b3654468042c77ce03e7d1743e941e82b326db6fdc6 |
|
MD5 | 26f50e519f2f3856858eb20591cc7251 |
|
BLAKE2b-256 | b388a7cddc7aed6fdf8d7544cc63b111cd943f2ce247c9f578c8ac6f9846c265 |
Close
Hashes for md_ulb_pwrap-0.1.1-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2df5b5746a928a8f6572ff25ecfa182567f6eaa8dd4f72e52f63e43bcde1741d |
|
MD5 | 77814d002c77a55b30678fe6176bc93e |
|
BLAKE2b-256 | cdf63f1caf584459a65c3a6102c25607feacda7332358ee77e0ac26926aa31d1 |
Close
Hashes for md_ulb_pwrap-0.1.1-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3c158b3f8e0d99979ca3d81d155d0fd9d11880126dfb521f9a5ad0e0b4a28a67 |
|
MD5 | cbe39126dc1bb0f75a8a9431dcd8e139 |
|
BLAKE2b-256 | b24e6826769da3988e201c33c8ea8f1477d290e9be336c013944d50b688b103b |
Close
Hashes for md_ulb_pwrap-0.1.1-cp312-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 88c176035ee1d2b89d886b66e1c0eefc8934457b239d5ef58b6f568f2c872245 |
|
MD5 | aef10e3b3601e733781f9ab48f502c34 |
|
BLAKE2b-256 | f45455ea0eff212093eb23553d3e110692efd711e759b5810d8bb9d22638f9e1 |
Close
Hashes for md_ulb_pwrap-0.1.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dc114b9d73e4ecfef5a06ee6a92651ff43282a21c9706e9b51e2dba2c2de1d8a |
|
MD5 | c49eaa20a298d13e39fc0ef804c58fa6 |
|
BLAKE2b-256 | 4b8406ee820fd6ec9d52d07a1b431d0d48c1c44038abca5ad3dd82bc5e4c3fc4 |
Close
Hashes for md_ulb_pwrap-0.1.1-cp312-cp312-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c9e9fb73e68a1dd55b817560c6bbe5e1fa3792f2c94082bdd9d365734c0250c8 |
|
MD5 | 116928b1c49eb3c299f213fe9f1a75c0 |
|
BLAKE2b-256 | e07026ba9c71684521e16b7c8af0743eeae812d18ae8ccd7208ace7d0d70b3d4 |
Close
Hashes for md_ulb_pwrap-0.1.1-cp311-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3ddbb9daa349eb05b4c51c37a9f595c3c6b16598f88b22566fdbc366bda2cd0e |
|
MD5 | b8d374b47bf9fcabac4c69a009934a4a |
|
BLAKE2b-256 | df5a625c5cccbb87ae8178205dea2edf6a8ee6f593a7a8f0acebfa6c27e1cb31 |
Close
Hashes for md_ulb_pwrap-0.1.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 94e763ddd10020010ec421812231625feb6d0bcb689bb10ffdb19bc12467a8e5 |
|
MD5 | 81a3b60b67703b86e0531a534aaffd0d |
|
BLAKE2b-256 | 049fe83542bde43effa285c2c860b533e947651665cdd6d16751cbb6bc6acd8d |
Close
Hashes for md_ulb_pwrap-0.1.1-cp311-cp311-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 12c49a75992d4acec5ed551633809f650c2372bc74f3e29e76c56b595828f5e9 |
|
MD5 | e7da59655bc0e85558c9622f02e0f3f9 |
|
BLAKE2b-256 | c743bc1532e076fe8c188a54e496e9efb77482e18a83810e4200715289163b3e |
Close
Hashes for md_ulb_pwrap-0.1.1-cp310-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f26eb8c901a371b5f020c27a39ae244820503247b0230f84c2d9d5ba5ab28fdf |
|
MD5 | e9022685821c772ee1f785d401d87e62 |
|
BLAKE2b-256 | 81724d66db03494de50969149296d61ac75bffbd043eb1f01a9b0cf6fa4ee45c |
Close
Hashes for md_ulb_pwrap-0.1.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4d8cfa5bd6ecbc123887199b2aa994a5eee470d918f5783bfc7040334d57943a |
|
MD5 | b564a869beb49dbd96ca532f2f352afe |
|
BLAKE2b-256 | c70021891027dd057392a306cb430292a152eaedd75e15450c3033a7aa286a5c |
Close
Hashes for md_ulb_pwrap-0.1.1-cp310-cp310-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 112441787e7af3dc1d07121156767686a41f4c0a3e3ee6a8e8e3f85bf9178bdf |
|
MD5 | 88a1737c87be8779e2039517d8048326 |
|
BLAKE2b-256 | 4a387026284b554637a69e730f67e5e82fc83df0b2722ad553f1b367541bc55d |
Close
Hashes for md_ulb_pwrap-0.1.1-cp39-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 38ea2d4db45167022904aaf6c6ae3214bfcd379bca5fc61d1300b9e8086f0566 |
|
MD5 | 5fc1e5e0ee1c7c306435f50fee087cc6 |
|
BLAKE2b-256 | 3fa684fa54ee8e97da00fcf13b88892030bb68ec9151b73b093ce2e2c6528758 |
Close
Hashes for md_ulb_pwrap-0.1.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cf8a4038316d331790187275bf8f50f54f3a6f0b1ce111485a62629a09014751 |
|
MD5 | 4bff08d28abc31f82cd26a58419baddd |
|
BLAKE2b-256 | 7db879481ae86fb6de4b750b551f773e16642e6b3be86646e6a82075e72e2bf1 |
Close
Hashes for md_ulb_pwrap-0.1.1-cp39-cp39-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 77310980bd1abd21655a51bef17e908e528a974cfb6cb6df062fc2b559c67ccd |
|
MD5 | 314e0f54b70fc43ecada8fd9605f0cbd |
|
BLAKE2b-256 | 78104a6b77953be6724583093137d350ba013d1944fb368ddc436084407ab9d0 |
Close
Hashes for md_ulb_pwrap-0.1.1-cp38-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 06c28d15e9d337abd9905a2a5a3f45c79ddd82d346945e486d2525ec69075677 |
|
MD5 | 8d15465e78a1c5813fa3f3cc3e9c5ad9 |
|
BLAKE2b-256 | 74ec9f0e56a64574b0617c46c5c91ce6746b1de8218f6cd66b4ee7ae6e28ce6a |
Close
Hashes for md_ulb_pwrap-0.1.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 96650c1da1033a9419183fd13f7b6b6286f18ab62edba26506a9a097f3c73552 |
|
MD5 | 1876070eb71c92c1dd3f14931020d359 |
|
BLAKE2b-256 | 98afa7fcc321fb198040519a7a3c11203ab7bd055037d8fa9a6de01e4062afe6 |
Close
Hashes for md_ulb_pwrap-0.1.1-cp37-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b7c054b576080b63031f35ad62305031370d1038cbfd67f9ea36c00b5a08c0a8 |
|
MD5 | 5805490a2e9742dfa32bd09e5b8c8d70 |
|
BLAKE2b-256 | 4867b401347f125f6ec4f1e2084dced1a1a581db9e707d942ad9b931810ef311 |
Close
Hashes for md_ulb_pwrap-0.1.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cf9a7cac7ed66c70bda0a530182e190bbc11ea260975ddc581196d9e3f8e79dc |
|
MD5 | ba629753d3ab494613b73773f7730797 |
|
BLAKE2b-256 | a5fa2c08c0317d0117b9df496ec09c1c699efd0dba67bd7d5559717d95c07918 |