https://spec.commonmark.org/0.31.2/#images says when you have a markup like  then "foo" is an image *description* and "title" is a title, both of them are optional. Writer also has a concept of image "names", though those have to be unique. Steps to reproduce the problem: 1) Open a test.md file with the "A  Z" in it twice. 2) Check the resulting image name, description & title. Expected results: 1) Image name has to be unique, so something auto-generated (by Writer) like Image1 & Image2 is fine. 2) md description is to be stored using SwFlyFrameFormat::SetObjDescription() 3) md title is to be stored using SwFlyFrameFormat::SetObjTitle() Actual results: 1) Name is filled in using the md title. The md import tries to give the same name to two fly formats currently, but that won't survive e.g. ODT export + import as the importer enforces unique names. 2) Description is empty 3) Title is filled in using the md description.
CC Ujjawal; I intend to get to this later this week, but wanted to flag this early in case you see anything problematic with this. Thanks.
Ujjawal Kumar committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/412c0391b56419bea6b0ff7c949ef2ced59a4d6b tdf#168446 Unique name for images and better image representation It will be available in 26.2.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Miklos Vajna committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/3a294f97a9b37cc8ff38f76200b5b58879a3a72f tdf#168446 sw markdown export: improve image name/description/title handling It will be available in 26.2.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.