Skip to main content

Markdown i18n and l10n using markdown-it-py

Project description

mdit-py-i18n

Markdown i18n and l10n using markdown-it-py.

CommonMark compliant. All core Markdown elements are supported, as well as table, and definition list. Front matter handlers are left for users to implement.

Install

pip install mdit-py-i18n

Notes

Some notes about how different elements are handled:

  • Inlines: hard line breaks are replaced with <br />, newlines and consecutive spaces are not kept;
  • Content of each HTML block isn't parsed into finer tokens but processed as a whole;
  • Fenced code blocks: disabled by default. When enabled, only // and # single comments are processed;

Usage

Extraction

  • Implement I18NEntryProtocol and DomainExtractionProtocol
  • Subclass RendererMarkdownI18N

Generation

  • Implement DomainGenerationProtocol
  • Subclass RendererMarkdownL10N

Development

Environment

  • With Conda
conda env create -f environment.yml
conda activate mpi
poetry install

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

mdit-py-i18n-0.2.1.tar.gz (6.9 kB view hashes)

Uploaded Source

Built Distribution

mdit_py_i18n-0.2.1-py3-none-any.whl (26.0 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