From b053a7c45939760bd74819a382632537275ff441 Mon Sep 17 00:00:00 2001 From: Dirk Roorda Date: Wed, 22 Jun 2022 16:53:26 +0200 Subject: [PATCH 1/2] fix missing images in export --- pandoc.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/pandoc.ts b/pandoc.ts index dc6cf80..7e43f2b 100644 --- a/pandoc.ts +++ b/pandoc.ts @@ -110,6 +110,19 @@ export const pandoc = async (input: PandocInput, output: PandocOutput, extraPara // Construct the Pandoc arguments list let args: string[] = []; + /* fix by Dirk Roorda to let Pandoc follow relative links + * with respect to the directory that the input source file is in. + * This fixes the cases where the plugin fails to include images. + */ + args.push('--resource-path') + args.push(path.dirname(input.file)) + /* end of fix by Dirk Roorda + * N.B. This fix is not yet tested through building the plugin. + * I have applied this fix in the my local + * .obsidian/plugins/obsidian-pandoc/main.js + * and that worked. + */ + if (input.format) { args.push('--from'); args.push(input.format); From e7ed4d42403d723498846f4971f8f3dd197bc9d5 Mon Sep 17 00:00:00 2001 From: Dirk Roorda Date: Fri, 21 Oct 2022 19:35:44 +0200 Subject: [PATCH 2/2] removed comments --- pandoc.ts | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/pandoc.ts b/pandoc.ts index 7e43f2b..742417c 100644 --- a/pandoc.ts +++ b/pandoc.ts @@ -110,18 +110,8 @@ export const pandoc = async (input: PandocInput, output: PandocOutput, extraPara // Construct the Pandoc arguments list let args: string[] = []; - /* fix by Dirk Roorda to let Pandoc follow relative links - * with respect to the directory that the input source file is in. - * This fixes the cases where the plugin fails to include images. - */ args.push('--resource-path') args.push(path.dirname(input.file)) - /* end of fix by Dirk Roorda - * N.B. This fix is not yet tested through building the plugin. - * I have applied this fix in the my local - * .obsidian/plugins/obsidian-pandoc/main.js - * and that worked. - */ if (input.format) { args.push('--from');