Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

The translation of HTML code containing comments fails #157

Copy link
Copy link
@bibich

Description

@bibich
Issue body actions

When I translate HTML code that contains HTML comment Deepl throws an exception :

Bad request, message: Tag handling parsing failed, please check input.
'text without parent'

If I remove the HTML comment the translation is done successfully. Also with tag_handling_version parameters set to "v1" no errors are thrown.

text = """
<!-- this is a comment -->
<p>a paragraph</p>
<p>another</p>
"""
translator = deepl.Translator(key)
result = translator.translate_text(
    text,
    source_lang="EN",
    target_lang="FR",
    tag_handling="html",
    tag_handling_version="v2",
)

current version of deepl-python is 1.28.0

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.