Markdown Filter

From Okapi Framework
Jump to: navigation, search


The Markdown Filter is an Okapi component for extracting translatable text from Markdown files. See for more information about the format. Markdown is a family of formats, not all of them mutually compatible. This filter is designed to work with markdown based on the CommonMark specification, with additional features to support GitHub-flavored Markdown.

Processing Details

Input Encoding

The filter decides which encoding to use for the input file using the following logic:

If the file has a Unicode Byte-Order-Mark: Then, the corresponding encoding (e.g. UTF-8, UTF-16, etc.) is used. Otherwise, the input encoding used is the default encoding that was specified when setting the filter options.

Inline Codes

The Markdown filter of Okapi Framework version 0.36 and later no longer supports the Inline Code Finder because it now uses the HTML filter as its subfilter, which is known to be incompatible with the Inline Code Finder.


Translate URLs (translateUrls)
By default, URLs in link and image statements are not exposed for translation. If this option is enabled, they will be extracted. Note: URLs are currently extracted inline in their containing segment, rather than as a subflow. Default: false
Translate Code Blocks (translateCodeBlocks)
This option, enabled by default, controls whether the contents of fenced code blocks are exposed for translation. Default: true
Translate YAML Metadata Header (translateImageAltText)
Some markdown formats support a YAML Metadata Header that contains key/value data. By default, this header is not exposed for translation. When the "Translate YAML Metadata Header" option is enabled, the header will be parsed and the metadata values will be exposed for translation. Default: false
Translate Image Alt Text (translateImageAltText)
The alt text for a graphic image in the form of ![alt text]( or as the alt attribute of an img tag <img src="" alt="alt text"> will be extracted if this parameter is true. Default: true.
HTML Subfilter Configuration ID (htmlSubfilter)
The custom configuration ID of the HTML filter that will be called to process HTML contents within Markdown documents. The configuration file must be saved in a known location with .fprm suffix. Specify nothing to use the default HTML filter configuration tailored for the Markdown filter. Default: (empty)


  • None known