From 255b5a4a9f1b18902fbed47700572fb91930b67c Mon Sep 17 00:00:00 2001 From: Sebastien Dubois Date: Wed, 22 May 2024 10:35:47 +0200 Subject: [PATCH] Tried fixing the table issue. #3 --- apps/plugin/src/app/utils/serialize-query.fn.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/apps/plugin/src/app/utils/serialize-query.fn.ts b/apps/plugin/src/app/utils/serialize-query.fn.ts index ade648b..716c8c3 100644 --- a/apps/plugin/src/app/utils/serialize-query.fn.ts +++ b/apps/plugin/src/app/utils/serialize-query.fn.ts @@ -12,6 +12,12 @@ export const serializeQuery = async ( let serializedQuery = ''; try { serializedQuery = await dataviewApi.tryQueryMarkdown(query); + // Reference: https://github.com/dsebastien/obsidian-dataview-serializer/issues/3 + if (query.toLocaleLowerCase().contains('table')) { + serializedQuery = serializedQuery + .replaceAll('\\\\', '\\') + .replaceAll('\n<', '<'); + } } catch (err: unknown) { log('Failed to serialize query', 'warn', err); }