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.2.tar.gz
(10.7 kB
view hashes)
Built Distributions
Close
Hashes for md_ulb_pwrap-0.1.2-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5d89ed11ae28c5c1f34749e7ae6d316738745d764c5eaf74324acd440f907520 |
|
MD5 | bb89d4f133ffae59e4491ac17bfc0aee |
|
BLAKE2b-256 | 9ad664c56a604d4bed66df9ca03cefe1f1793534778fc000a7e2c76482dd10af |
Close
Hashes for md_ulb_pwrap-0.1.2-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7b7d58dfc943dcb50752d59a17f1fad0be3f2080b17b89c8fefa02eca8745d80 |
|
MD5 | f5390e4720cd42b164047b0175a96850 |
|
BLAKE2b-256 | f8c7a5ccd32a549c39361b8113b376c335655eb9ac6eebf41f470fa72378ab9a |
Close
Hashes for md_ulb_pwrap-0.1.2-cp312-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4a48bb3d156db3aa09a468c852994540ab7d4e185019274de407db928a338109 |
|
MD5 | 08cc564a647907da9cb5ab52119e03da |
|
BLAKE2b-256 | defdf197968c5bf23d5da9e3d5509a171378d531ad2919744154d4df835b15bd |
Close
Hashes for md_ulb_pwrap-0.1.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e500b9ebf4eb2ddd7279e7ad70e04d40fef00a97fa29e86546dba0e0cff34201 |
|
MD5 | 09c5672f7808754e9a527408105ea4a8 |
|
BLAKE2b-256 | e8853e35c4aabffec7c6f0eee5de1ac3495302a5b6b0e6b3a0dac7dcfa6723b4 |
Close
Hashes for md_ulb_pwrap-0.1.2-cp312-cp312-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f706785c79f3b0c3cc444351bd443d00a17a713236b07719b6d8542b0ad441e2 |
|
MD5 | 49ef1ad9e2df55770d61091a698da3db |
|
BLAKE2b-256 | 3ecba6b12b1064ea9afcfb0f3ba848b065ab39397cc01d7de55085a394abd038 |
Close
Hashes for md_ulb_pwrap-0.1.2-cp311-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cc5a959b0d57976e2b13ff7edd3d9972212c7550322296795c5c065f91b5522b |
|
MD5 | df2078bf1533decc7d70fe260d0e0c75 |
|
BLAKE2b-256 | 9fd16acf7056225114fbe996be6d1338e58ac3a93b525f398ef0dd75f4de9dd8 |
Close
Hashes for md_ulb_pwrap-0.1.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e36c90796e764f1ce87d6b18110ce1ac11d50fa18de66a6984e82a5d4b39c29d |
|
MD5 | d536ba149da2c7eb1fad63c821de6530 |
|
BLAKE2b-256 | 047c59718342f0a4d6980ff3bb03e77582d72a9b7b2f8f46717ee61a981906dd |
Close
Hashes for md_ulb_pwrap-0.1.2-cp311-cp311-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a99c2cdc1a10b79937a62f4c867f9086b7eeaf03865ca754618e23e0317a4360 |
|
MD5 | 6f38bb7076f49a8570f79831ec4cb83b |
|
BLAKE2b-256 | 9b746baac85c68d46d1b4804c3e02fae92d73524b94443ab5bac9a0a259a778b |
Close
Hashes for md_ulb_pwrap-0.1.2-cp310-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b6de812481ca6c183a963f13c2d5f37f9390cd11ff7a3dee27a1492d903b2d97 |
|
MD5 | 3f2175ce36519012567cdd32a8b2c014 |
|
BLAKE2b-256 | bf7e17e64c201a34c7f768b821a403cc159de43c9bacf1f2b8963fba15694a33 |
Close
Hashes for md_ulb_pwrap-0.1.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c4425fa7d9518a08178476d142418b6116aa72571816dfb0d69e5d5f01ad53a5 |
|
MD5 | 5b960ff8452d5406ea7066da412c3f3a |
|
BLAKE2b-256 | 0ece2ceab2f48e64141dd34bac03b4dfaa1d90b11fa48ed5dfb2e3317240c047 |
Close
Hashes for md_ulb_pwrap-0.1.2-cp310-cp310-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3b41930ad8598b4bcf441dd94ad08757c4b855b1272a489a0b506da0df796389 |
|
MD5 | e6634aceeea85cbd495a6a886e44a438 |
|
BLAKE2b-256 | 18be4a090ed594cef92cdfeb9ea6833f317542684276a25dd4a54a715db51d2e |
Close
Hashes for md_ulb_pwrap-0.1.2-cp39-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 58543863129a672c00553e1a77c4da0957984a3e755ea85c9d5c951b8b25dcc4 |
|
MD5 | 6f632490ac2d35591d19667103ea1545 |
|
BLAKE2b-256 | cfff9e17997121e881a5eed65d71d7402bb304c6b57946852031a78d36a49044 |
Close
Hashes for md_ulb_pwrap-0.1.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b99dacf988f16be48f837bbd5163e588e71d0f25543a77f485642e7b42ce2aa8 |
|
MD5 | fd442c4c923303b612a0b21857f1554a |
|
BLAKE2b-256 | 45dc7ac75ce32f6aa1e72da6150e21856f7bd544368824b0fcd9742c8c7cf315 |
Close
Hashes for md_ulb_pwrap-0.1.2-cp39-cp39-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d01263a45859eae45537d0ec75f1b9a50d6840f9efc223d00b9e6a7e6c9c013a |
|
MD5 | ec672891e9c38e8a52e927f353b4931d |
|
BLAKE2b-256 | cc3eda65495ef4065a05365ebf3c37deffb9830d34e36263b54fe36d91f4e877 |
Close
Hashes for md_ulb_pwrap-0.1.2-cp38-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 487400abc6f9f7b8316027a34cdc8e91dedb294b0737d896f9ae303b6a467a0d |
|
MD5 | 9c30c5429ab9f2dc71cbe46cd8e845a3 |
|
BLAKE2b-256 | f0a6c0e4863031b9d63aea3c6ebd30a9aed1f45905c335420e9ba53c0004285f |
Close
Hashes for md_ulb_pwrap-0.1.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3a027b5538be40b99c13e793c7bbea3025238ededeae7e6e31cfb0e4d8e6122d |
|
MD5 | f8180940867a8afa4a1d8098c96c34fa |
|
BLAKE2b-256 | 07a443596a29f2db542539c0b1bde2d94a70efbfa2bdf4ff252a913894041fbb |
Close
Hashes for md_ulb_pwrap-0.1.2-cp37-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0e99a39f6c9ae788c182801708ebaae221165b6f43b9774fb9a34c60e6d936d4 |
|
MD5 | 1076c5f408ffc8945dcef4c97da55a3e |
|
BLAKE2b-256 | a5cd96a8a15195aa2d4e6d0132da0cfefd021c06d1638c474f1b1e8fec8198c6 |
Close
Hashes for md_ulb_pwrap-0.1.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0015817937e96d3b680727e96c824307bc2ca42ce263b65bcac8f21e860aed77 |
|
MD5 | b437b5572fe9072ce5a7cabb00ee8585 |
|
BLAKE2b-256 | 700e51bf106d440971d6f6d950d9ca0b2ceb5dcc56f0a45781aa6a70125a38b7 |