Skip to main content

Python bindings for Rust crate md-ulb-pwrap.

Project description

md-ulb-pwrap

Crate PyPI

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.3.tar.gz (9.7 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

md_ulb_pwrap-0.1.3-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (239.6 kB view details)

Uploaded PyPymanylinux: glibc 2.17+ x86-64

md_ulb_pwrap-0.1.3-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (239.7 kB view details)

Uploaded PyPymanylinux: glibc 2.17+ x86-64

md_ulb_pwrap-0.1.3-cp313-cp313-win_amd64.whl (108.6 kB view details)

Uploaded CPython 3.13Windows x86-64

md_ulb_pwrap-0.1.3-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (238.2 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

md_ulb_pwrap-0.1.3-cp313-cp313-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (421.7 kB view details)

Uploaded CPython 3.13macOS 10.12+ universal2 (ARM64, x86-64)macOS 10.12+ x86-64macOS 11.0+ ARM64

md_ulb_pwrap-0.1.3-cp312-cp312-win_amd64.whl (108.7 kB view details)

Uploaded CPython 3.12Windows x86-64

md_ulb_pwrap-0.1.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (238.1 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

md_ulb_pwrap-0.1.3-cp312-cp312-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (421.6 kB view details)

Uploaded CPython 3.12macOS 10.12+ universal2 (ARM64, x86-64)macOS 10.12+ x86-64macOS 11.0+ ARM64

md_ulb_pwrap-0.1.3-cp311-cp311-win_amd64.whl (108.7 kB view details)

Uploaded CPython 3.11Windows x86-64

md_ulb_pwrap-0.1.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (239.0 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

md_ulb_pwrap-0.1.3-cp311-cp311-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (426.6 kB view details)

Uploaded CPython 3.11macOS 10.12+ universal2 (ARM64, x86-64)macOS 10.12+ x86-64macOS 11.0+ ARM64

md_ulb_pwrap-0.1.3-cp310-cp310-win_amd64.whl (108.8 kB view details)

Uploaded CPython 3.10Windows x86-64

md_ulb_pwrap-0.1.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (239.3 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

md_ulb_pwrap-0.1.3-cp39-cp39-win_amd64.whl (109.2 kB view details)

Uploaded CPython 3.9Windows x86-64

md_ulb_pwrap-0.1.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (240.4 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

md_ulb_pwrap-0.1.3-cp38-cp38-win_amd64.whl (109.2 kB view details)

Uploaded CPython 3.8Windows x86-64

md_ulb_pwrap-0.1.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (240.1 kB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

md_ulb_pwrap-0.1.3-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (239.9 kB view details)

Uploaded CPython 3.7mmanylinux: glibc 2.17+ x86-64

File details

Details for the file md_ulb_pwrap-0.1.3.tar.gz.

File metadata

  • Download URL: md_ulb_pwrap-0.1.3.tar.gz
  • Upload date:
  • Size: 9.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.8.3

File hashes

Hashes for md_ulb_pwrap-0.1.3.tar.gz
Algorithm Hash digest
SHA256 b99e13285a8b53f6fc9d88334b84dd56fb71cc961ded799dcdf0bdff63d0207d
MD5 ff27c1b5a407e6cfe6329dbc706b8c43
BLAKE2b-256 3bcfb6e362d77be7198a31b775d059f5dea22d77855cd28df98a9b48a3d94c8e

See more details on using hashes here.

File details

Details for the file md_ulb_pwrap-0.1.3-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for md_ulb_pwrap-0.1.3-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8c0461c869c7c626cd9f5cf6b6485e414815bcc511c4626c217b9f21d2d4d728
MD5 1dcce58a1a482c7b318656a696347e6b
BLAKE2b-256 59d2f3d01cb472ee7c15285f256396b2a802e959afe1231f34c5d3e5460b2daa

See more details on using hashes here.

File details

Details for the file md_ulb_pwrap-0.1.3-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for md_ulb_pwrap-0.1.3-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a792f878e9a53f5f3d9a030113faa6dbadaeaa11fd429db4788db2dd59560980
MD5 b0788291b4f214c1c9b61c9ac899b42c
BLAKE2b-256 69d39eb28f6fe1190cd386b99ec336ea4453584298da6c747c68285963bdd472

See more details on using hashes here.

File details

Details for the file md_ulb_pwrap-0.1.3-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for md_ulb_pwrap-0.1.3-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 b15e9126901d5006e6249e8692374c615827104b3dae4eb6ff0068c2addcf549
MD5 9735be0c1d3d7aa12a9f6252c236413e
BLAKE2b-256 4796f66f764ec8ea882f740462e0274580019983abef84b962eeb4ca1e4f1d11

See more details on using hashes here.

File details

Details for the file md_ulb_pwrap-0.1.3-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for md_ulb_pwrap-0.1.3-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 06f75d7f6ae9c9efdb867dfca3e27966d359bab14eb628f2fc1730c5a98345ac
MD5 51ca06d99a456421cb90f670b6a792ee
BLAKE2b-256 3ba7c5cd32154b3cae43f6c36a34b09328be0706838d6e47cc90b486a175c3d2

See more details on using hashes here.

File details

Details for the file md_ulb_pwrap-0.1.3-cp313-cp313-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl.

File metadata

File hashes

Hashes for md_ulb_pwrap-0.1.3-cp313-cp313-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 a977bbc12abac3ec802058b7dcb8cd68ab8a9a13e453110c39a3c68a88858ab8
MD5 7aabc8897bc835bc5e2db62d7027bf14
BLAKE2b-256 9b8a8fb0a79fef64285004e2645ecbe283c2bb75d1e2dcd90645e5b6a68fc120

See more details on using hashes here.

File details

Details for the file md_ulb_pwrap-0.1.3-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for md_ulb_pwrap-0.1.3-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 d616d4dc21df219a79b8eda1469287d2993744f3c199c0e453717f7902fc693d
MD5 d843959a859e7e89478d929049ce9f8f
BLAKE2b-256 699bc243bfd10ae78b63771ce4e8682a96b479751f2ad979b1c29b644249c413

See more details on using hashes here.

File details

Details for the file md_ulb_pwrap-0.1.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for md_ulb_pwrap-0.1.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 5c089757fadaaf0e6379cdbb33d31ffe0cd9e9ebac16e6c562b99a25a7965224
MD5 0008a5145a976f99efd63d7e5a311d50
BLAKE2b-256 7398f8f768434c528fda727815492d227effb38e9c9a40c362103ccf72a95026

See more details on using hashes here.

File details

Details for the file md_ulb_pwrap-0.1.3-cp312-cp312-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl.

File metadata

File hashes

Hashes for md_ulb_pwrap-0.1.3-cp312-cp312-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 c41a0ed1136e7ba08597234f0da9cb4e412e096fcfa13b6a94d0ba14d0829ce2
MD5 787015bc19e8ffaacddbdf849048f06a
BLAKE2b-256 cf546c9a9edf41f7421bbbcd69d42543bacd384110ccfe454d0571718c919554

See more details on using hashes here.

File details

Details for the file md_ulb_pwrap-0.1.3-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for md_ulb_pwrap-0.1.3-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 6c31e2c3053b260c92cb724a98fa721ada4f44a68ce46075db348993444f61a0
MD5 dfce3ee8d503e64937ad6955a0e0f496
BLAKE2b-256 52d668033f4c1b8401b00d041785e8261b5e4ec735304463f1853d1b6f65a2f8

See more details on using hashes here.

File details

Details for the file md_ulb_pwrap-0.1.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for md_ulb_pwrap-0.1.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d21c2353f20399bd9edb9e2899042732779aa878738a5101cb17c5b317bb1ec2
MD5 3a65747af0a25d3dbab196f046583443
BLAKE2b-256 0229fcff851f09f924cc9a2edd2affd374426af1f15d6b9c263c47bc6e4337e1

See more details on using hashes here.

File details

Details for the file md_ulb_pwrap-0.1.3-cp311-cp311-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl.

File metadata

File hashes

Hashes for md_ulb_pwrap-0.1.3-cp311-cp311-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 4aa96136b22a5a24f84f5a36abb777b86bbc52da440263658c5dc156308a8b0a
MD5 7f72ed30bfd707eec3044693c44afad1
BLAKE2b-256 6bff6702bb913840f9e3a86e86c77654828081302e25f1255e06f44f11670c2f

See more details on using hashes here.

File details

Details for the file md_ulb_pwrap-0.1.3-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for md_ulb_pwrap-0.1.3-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 8127904b0dfc62ea4907244a01743a2de49501ad5739af182f9576c98caa5d17
MD5 1c1f760e2106c0618d0250a76695463f
BLAKE2b-256 907f17c3336c64af6f867315bca51e0a549d5a734c9ec593fc16d5f760f850a0

See more details on using hashes here.

File details

Details for the file md_ulb_pwrap-0.1.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for md_ulb_pwrap-0.1.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 268f60c862fd3ba4dc453c9857ae24c6d0aca240a81f8f1b6fe1f50c57efa5a7
MD5 abab8c0fb5f199d4688269287fb9959a
BLAKE2b-256 3acf07b151fad99ff693e517b0fb3de197823ae4edda84f9b7ff9fee798cdf27

See more details on using hashes here.

File details

Details for the file md_ulb_pwrap-0.1.3-cp39-cp39-win_amd64.whl.

File metadata

File hashes

Hashes for md_ulb_pwrap-0.1.3-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 3173ebc2d8df951f4881a8dba796263978905d1d85b3003c4eb460ae4ad9fbf7
MD5 505b7c87599e87daf63c8ef5979ddc97
BLAKE2b-256 4a3177a29e7cbd1979361610ea4df211daaae493cc2b00fd87f9688069fb6dbe

See more details on using hashes here.

File details

Details for the file md_ulb_pwrap-0.1.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for md_ulb_pwrap-0.1.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 088b70bc074d3ffdd0a3f1f7de760ecf03c5ac88762d32133e016481bd0ed321
MD5 87909475956590ac3c1d66f848993ac9
BLAKE2b-256 2ea2aa244f926fb7fd707bbec6ab17f20d9e92f787e1dc1770819ab98a6725be

See more details on using hashes here.

File details

Details for the file md_ulb_pwrap-0.1.3-cp38-cp38-win_amd64.whl.

File metadata

File hashes

Hashes for md_ulb_pwrap-0.1.3-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 15f6587eec6595f88434f021e019796ec38ab95b8b437d5b83152d5f3db46f92
MD5 89fc9a270b574664228fe74fe3dd3fa8
BLAKE2b-256 aa7fa757667e13886e347c5f762220fc13e3b39951dbb3ed0295121f66fa1841

See more details on using hashes here.

File details

Details for the file md_ulb_pwrap-0.1.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for md_ulb_pwrap-0.1.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 de581fdfc6fea9a141d97c52d01a237df279fcefa2b1f0ac09e6e3370490e78b
MD5 ef2061612813eb0dfec59ec593c17b98
BLAKE2b-256 35f0d4284fa3509ae26f4df49c4338bc9f927d61aac9712536abf5648b7d0164

See more details on using hashes here.

File details

Details for the file md_ulb_pwrap-0.1.3-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for md_ulb_pwrap-0.1.3-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9883c6e36d4bfc0834d7fe47ddd51260b66c1c0c5d674bcd9f0a3262b0325a3b
MD5 f7bfe2294280d1c789e7b26c7d107aea
BLAKE2b-256 bd94da99db310a15776370e4e820fbbdd624e9b567b4859a1666397e335c623d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page