将DOCX转换为Markdown无法放置图像

问题描述 投票:0回答:1

我正在尝试使用Mammoth将带有图像的DOCX文件转换为Markdown格式:

mammoth git.docx --output-format=markdown > git.md

当我把git.md推到github并检查它。它没有显示图像

当我在文本编辑器中打开git.md时,以下内容用于图像

![](data:image/png;base64,jasdkjh)
markdown mammoth
1个回答
0
投票

我怀疑GitHub不喜欢内联图像数据。尝试提供--output-dir

默认情况下,图像包含在输出HTML中。如果--output-dir指定了输出目录,则会将图像写入单独的文件。例如:

mammoth document.docx --output-dir=output-dir

如果存在,将覆盖现有文件。

© www.soinside.com 2019 - 2024. All rights reserved.