mdpo.md module

Markdown related utilities for mdpo.

Parses link references found in a Markdown content.

Parameters:

content (str) – Markdown content to be parsed.

Returns:

Tuples with 3 values, target, href and title for each link reference.

Return type:

list

Solve link reference targets in markdown blocks.

Given a dictionary of msgid/msgstr translations, those link references targets will be resolved and returned in a new dictionary.

Parameters:

translations (dict) – Mapping of msgid-msgstr entries from which the resolved translations will be extracted.

Returns:

New created messages with solved link reference targets.

Return type:

dict