Markdown is a popular plain-text file format for creating formatted text. For example, many software developers use it for easily creating documentation. It has many different variants (also called flavors).
The CommonMark syntax has very complicated rules about how to write some elements - so that conversion to HTML works as clearly as possible. This topic doesn't go into all the details. To learn more, read the latest version of the CommonMark specification.
In the Document import options window, select the MD file, and click Change filter and configuration.
The Document import settings window appears. From the Filter drop-down list, choose Markdown filter.
Markdown uses special characters like asterisks (*) and underscores (_) for formatting text. The basic rule is: a pair of single asterisks or underscores means italic (same as the <em>
HTML tag), and a pair of double asterisks or underscores means bold (same as the <strong>
HTML tag).
To see such formatting as inline tags (): Choose the memoQ inline tags radio button.
To see such formatting in the translation grid (): Choose the memoQ formatted content (where possible) radio button.
Soft line breaks (when the line ends with a newline character):
To see a <br>
inline tag where soft line breaks are: Choose the Import as inline tags radio button.
To ignore soft line breaks: Choose the Do not import radio button.
To ignore soft line breaks but produce more even-looking text in the translated file: Choose the Do not import, but generate average-length lines at export radio button.
Hard line breaks (when the line ends with two spaces or a <br>
HTML tag):
To start a new segment on every hard line break: Choose the Start new segment radio button.
To see a <br>
inline tag where hard line breaks are: Choose the Import as inline tags radio button.
To have both: Choose the Import as inline tags and start a new segment radio button.
To ignore hard line breaks: Choose the Do not import radio button.
There are two kinds of code blocks in Markdown:
indented code blocks are one or more neighboring lines that begin with four or more spaces.
fenced code blocks are one or more neighboring lines between lines of three or more backticks (`) or tildes (~).
To import fenced code blocks into the main translation document: Choose the Import as translatable radio button and leave the Import fenced code blocks as embedded objects checkbox cleared.
To import fenced code blocks into separate documents under the main translation document: Choose the Import as translatable radio button and select the Import fenced code blocks as embedded objects checkbox.
To ignore fenced code blocks: Choose the Do not import radio button.
Even if you don't import fenced code blocks for translation, they will be visible in the preview.
Markdown files can have HTML content inside. When the HTML content is in blocks of neighboring lines, you can import them as separate embedded files under the Markdown file. To do this, at the bottom of the Document import options window, select the Import embedded objects checkbox.
first line begins with the characters <!--
last line contains the characters -->
.
Examples:
<!-- This
is a
comment -->
<!-- This is another comment -->
When a comment is not inside a HTML block (that is, it is between lines of non-HTML content), you can import it into the Markdown file itself. To do this, in the Markdown filter configuration's HTML section, select the Import top-level HTML comments as translatable checkbox.
In the current version,