Skip to content

Issue with bold markdown not closing properly after translation #27

Description

@GerbenKR

Hi,

We are experiencing some issues with translating markdown text, specifically when it comes to bold (**) markup.

For example, consider the following text:

**title:** this is a **bold** text that sometimes doesn’t translate very well

When this gets translated, we sometimes receive different outputs. Here’s what we expect:

Correct output:

**titel:** dit is een **vetgedrukte** tekst dat niet altijd goed vertaalt.

Incorrect output:

**titel: dit is een **vetgedrukte tekst dat niet altijd goed vertaalt.

As you can see, in the incorrect output, the bold markup is not properly closed. This breaks the formatting and causes rendering issues in our UI.

Some additional context:

  • This issue does not seem to be limited to one specific target language.
  • According to the DeepL API documentation, it's recommended to either convert markdown content to HTML/XML or to send it in chunks.

Feature request:
Would it be possible to add an option (preferably configurable per Craft CMS field) to indicate that a field contains markdown content? That way, the plugin could handle these fields differently during translation, for example by first converting the markdown to HTML or XML and then using the appropriate tag_handling=html or tag_handling=xml parameter when sending the content to DeepL.

Thanks in advance for looking into this!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions