Skip to content

Commit

Permalink
Tried fixing the table issue. #3
Browse files Browse the repository at this point in the history
  • Loading branch information
dsebastien committed May 22, 2024
1 parent ff1fd79 commit 255b5a4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions apps/plugin/src/app/utils/serialize-query.fn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 255b5a4

Please sign in to comment.