deepl-node icon indicating copy to clipboard operation
deepl-node copied to clipboard

Feature Request: Markdown Handling

Open lyqht opened this issue 2 years ago • 2 comments

Hi there, thanks for the great library to use the DeepL API!

I made a github action for using deepl-node to translate text documents, however there's quite a lot of limitations in trying to parse markdown elements.

You can refer to some limitations that's mentioned in this demo or this PR.

The formatting errors that were raised in both examples may be due to the use of markdown checkboxes, bolded text etc, since most other HTML elements were able to be translated accurately, and only break on certain languages.

lyqht avatar May 26 '23 04:05 lyqht

Hi @lyqht, sorry for the very late reply on this issue.

Yes, we're aware that Markdown formatting is not handled very well; our translation models are not intended to handle this kind of text.

We'd like to better support Markdown in future, e.g. as another document type (like HTML or PDF); the feature is in our backlog.

daniel-jones-dev avatar May 06 '24 13:05 daniel-jones-dev

@daniel-jones-dev Do you have a rough timeline when this feature might come?

gwildu avatar Aug 20 '24 15:08 gwildu

Any updates?

brycepg avatar Mar 23 '25 17:03 brycepg

Same questions here. Especially for Deepl API it's really a necessity.

mvletter avatar Mar 28 '25 20:03 mvletter

What I ended up doing is converting my output to HTML using a library, feeding it to deepl with the HTML flag, and then converting it back to markdown for the output using another library

brycepg avatar Mar 29 '25 16:03 brycepg

Nice workaround thx!

mvletter avatar Mar 30 '25 22:03 mvletter

What I ended up doing is converting my output to HTML using a library, feeding it to deepl with the HTML flag, and then converting it back to markdown for the output using another library

I wonder if deepl can do this under the hood too!

lyqht avatar Mar 31 '25 02:03 lyqht

@brycepg may I ask you what library you've used? I tried https://github.com/showdownjs/showdown and run into issues with tables and footnotes.

jobee avatar Jul 22 '25 12:07 jobee

Any update? Is it planned to provide proper markdown support? Thanks

brauliodiez avatar Aug 07 '25 10:08 brauliodiez