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
andDomainExtractionProtocol
- 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)
Built Distribution
Close
Hashes for mdit_py_i18n-0.2.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f717f71e3980977063327032335818fa64ca54d309ebc597a5c07ca73a073f0c |
|
MD5 | b969bcdc5cc5fa1312fc408fcb6f1ad2 |
|
BLAKE2b-256 | ad3ce04ad48b606f075b60c9b91701df0873a1b5c3eefe0ef72e183f91c4fdbe |