Markdown parsing.
Project description
Bindings for the MD4C markdown parser.
Installing
pip3 install md4c
Usage
import md4c
md4c.load(path_to_lib)
def enter_block(type, data):
print('eb', type, '>', data)
def leave_block(type, data):
print('lb', type, '>', data)
def enter_span(type, data):
print('es', type, '>', data)
def leave_span(type, data):
print('ls', type, '>', data)
def text(type, data):
print('ls', type, '>', data)
client = md4c.Client(
enter_block = enter_block,
leave_block = leave_block,
enter_span = enter_span,
leave_span = leave_span,
text = text
)
client.parse('is *this* `thing`\n## working?')
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
md4c-0.0.0.tar.gz
(4.6 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
md4c-0.0.0-py3-none-any.whl
(6.7 kB
view details)
File details
Details for the file md4c-0.0.0.tar.gz.
File metadata
- Download URL: md4c-0.0.0.tar.gz
- Upload date:
- Size: 4.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.39.0 CPython/3.8.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
80ba70866fb626c09e9b07938cfc3a560c4d0f6c1ef38302f0207f3552b2802c
|
|
| MD5 |
826a49f7b292f11effb03344e3b3919b
|
|
| BLAKE2b-256 |
91e9581a4e7b0200cb11556e4ce81ff5927565ada68ad8927576de1d5587fe8a
|
File details
Details for the file md4c-0.0.0-py3-none-any.whl.
File metadata
- Download URL: md4c-0.0.0-py3-none-any.whl
- Upload date:
- Size: 6.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.39.0 CPython/3.8.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
31b51fe87980bd618be705c885b4632eab7b7924022e5db6156282b0eb8a1fca
|
|
| MD5 |
cd0b196a8e9739fd0b3359547670e54c
|
|
| BLAKE2b-256 |
bfdaed566c29c7928f783413828ccefa433254a1f69356e742736dea7376334c
|