Skip to main content

Python markdown extension for insert a space between Chinese / Japanese / Korean and English words

Project description

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.

build

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',
}

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

markdown_cjk_spacing-0.1.1.tar.gz (3.1 kB view hashes)

Uploaded Source

Built Distribution

markdown_cjk_spacing-0.1.1-py3-none-any.whl (4.7 kB view hashes)

Uploaded Python 3

Supported by

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