Skip to content

Invalid conversion of bold and italic text from .odt files to Markdown #10696

@sotirismorf

Description

@sotirismorf

I created a minimal_repro.odt using LibreOffice Writer (attached here) that contains bold and italic text.

Here is a preview. I have added a red box around the characters to which I applied the styles.

Image

I converted the file to markdown with this command

pandoc minimal_repro.odt -o output.md

And I got the following output

This will be **bolded** correctly

This will be **bolded **incorrectly

This will be *italicized* correctly

This will be *italicized *incorrectly

This is incorrect. According to the markdown spec, this is not valid emphasised text.

The correct output should be:

This will be **bolded** correctly

This will be **bolded** incorrectly

This will be *italicized* correctly

This will be *italicized* incorrectly

I used the pandoc/core:3.6.3 docker image

pandoc 3.6.3
Features: +server +lua
Scripting engine: Lua 5.4

Sidenote: this could possibly be a bug with .docx files as well, however I am not able to test it.

This is probably related to 1709

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions