markdown_cjk_spacing
Python markdown extension for insert a space between Chinese / Japanese / Korean and English words, to display beautifully.
中文Chinese西文English is converted to 中文 Chinese 西文 English.
Installation
Install with pip.
$ pip install markdown-cjk-spacing
Usage
It is used as an extension of Python-Markdown.
import markdown
md = markdown.Markdown(extensions=["markdown_cjk_spacing.cjk_spacing"])
md.convert("markdown text")
Or use from Pelican as Markdown extension.
# pelicanconf.py
MARKDOWN = {
'extension_configs': {
'markdown.extensions.codehilite': {'css_class': 'highlight'},
'markdown.extensions.extra': {},
'markdown.extensions.meta': {},
'markdown_cjk_spacing.cjk_spacing': {},
},
'output_format': 'html5',
}
Segment split conversion
In Chinese / Japanese sentences, if you do a line feed, it will be a one-byte space, but you can delete this space.
import markdown
md = markdown.Markdown(extensions=["markdown_cjk_spacing.cjk_spacing"],
extension_configs={'markdown_cjk_spacing.cjk_spacing':
{'segment_break': True}})
md.convert("markdown text")
Metadata
Release files for markdown-cjk-spacing 0.2.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| markdown_cjk_spacing-0.2.2.tar.gz | 3.6 kB | Without provenance | Details for markdown_cjk_spacing-0.2.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| markdown_cjk_spacing-0.2.2-py3-none-any.whl | Python 3 | none | any | Details for markdown_cjk_spacing-0.2.2-py3-none-any.whl |
Total release size: 8.7 kB
Release files / markdown_cjk_spacing-0.2.2.tar.gz
| Download URL | markdown_cjk_spacing-0.2.2.tar.gz |
|---|---|
| Size | 3.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5366dd9673d0a095cc6bc483c2efcdd0b5ccc1ebf988429f39e800d663dde20d
|
|
BLAKE2b-256 checksum How to use checksums |
c4d0676a06288572f3a2a41a7348e1da6543b16796f0973db43278bfed1e1333
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.33.0 CPython/3.7.3
|
Release files / markdown_cjk_spacing-0.2.2-py3-none-any.whl
| Download URL | markdown_cjk_spacing-0.2.2-py3-none-any.whl |
|---|---|
| Size | 5.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d6c228e6b08ce75fd8a9fb1b0b010e742b258112da0e17de3d2d46cca6b43e10
|
|
BLAKE2b-256 checksum How to use checksums |
068760b2f581bb671d3e021f18407e5ac8c85cc6af1d630931e33ad4f07f9497
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.33.0 CPython/3.7.3
|
Security for markdown-cjk-spacing 0.2.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.