alxnbl / onenote-md-exporter

ConsoleApp to export OneNote notebooks to Markdown formats
GNU General Public License v3.0
919 stars 75 forks source link

Exported picture bad format when nested into a table #87

Closed Bratieres closed 1 year ago

Bratieres commented 1 year ago

Describe the bug Some embedded pictures in OneNote when imported into Joplin have bad syntax format :

""![image1](:/e887b8c3c94f417cb877b0ae5f264510)"" instead of ""image1""

As display is interpreted, even with double quotes, I explain it : there is an explicit backslash before [ and ]

To Reproduce

Steps to reproduce the behavior. Ideally, export a basic OneNote notebook (.onepkg) that can be use to reproduce the issue. Tutorial to export .onepkg file is available here. (zip of page export)

Expected behavior No backslash arround brackets, removing backslash makes picture be OK.

Attached file is exported page having this problem. Others pages of this notebook are OK and some pictures (the last ones) of this page are OK too.

Logs Join the "logs.txt" log file located in the directory of the tool. ⚠️ Ensure that the log file do not contain any personal data ⚠️

Desktop (please complete the following information):

Additional context Add any other context about the problem here.

alxnbl commented 1 year ago

Thank for your report. Sorry but I will be very busy the next few months and will not be able to have a look to the issue. Hopefully, a kind contributor will take a look at your problem.

Bratieres commented 1 year ago

Have had a new look to this. It seems it happens in tables only

To avoid text substitution, I have inserted one " " before all "[" and after all "<" below.


! [image2] (:/ff87503a205644719d6f5fa65fae91b6)

alone : works and displays image BUT

< table> ! [image2] (:/ff87503a205644719d6f5fa65fae91b6) < colgroup>

Does not display picture but text " ![..."

alxnbl commented 1 year ago

Indeed, it is a known limitation / bug of the tool. I insert markown image reference inside HTML table, which is not valid markdown. To be corrected in the future but I do not have an easy solution right not to fix it.

alxnbl commented 1 year ago

Duplicate of #48