Skip to content

Commit

Permalink
fix(core): unresolved helper when using custom template (#26)
Browse files Browse the repository at this point in the history
  • Loading branch information
bandantonio authored Jul 8, 2024
1 parent 7c39131 commit dc78460
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions manifest.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"id": "apple-books-import-highlights",
"name": "Apple Books - Import Highlights",
"version": "1.2.4",
"version": "1.2.5",
"minAppVersion": "0.15.0",
"description": "Import your Apple Books highlights and notes to Obsidian.",
"author": "bandantonio",
"authorUrl": "https://github.com/bandantonio",
"isDesktopOnly": true
}
}
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "obsidian-apple-books-highlights-plugin",
"version": "1.2.4",
"version": "1.2.5",
"description": "Import highlights and notes from your Apple Books to Obsidian",
"main": "main.js",
"scripts": {
Expand Down Expand Up @@ -58,4 +58,4 @@
"dayjs": "^1.11.10",
"handlebars": "^4.7.8"
}
}
}
2 changes: 2 additions & 0 deletions src/methods/renderHighlightsTemplate.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import * as Handlebars from 'handlebars';
import { ICombinedBooksAndHighlights } from '../types';
import 'src/utils/helpers';

export const renderHighlightsTemplate = async (highlight: ICombinedBooksAndHighlights, template: string) => {
const compiledTemplate = Handlebars.compile(template);
const renderedTemplate = compiledTemplate(highlight);
Expand Down
1 change: 0 additions & 1 deletion test/renderHighlightsTemplate.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import { aggregatedHighlights } from './mocks/aggregatedDetailsData';
import { rawCustomTemplateMock } from './mocks/rawTemplates';
import { defaultTemplateMock, renderedCustomTemplateMock } from './mocks/renderedTemplate';
import defaultTemplate from '../src/template';
import '../src/utils/helpers';

describe('renderHighlightsTemplate', () => {
const helpers = Handlebars.helpers;
Expand Down

0 comments on commit dc78460

Please sign in to comment.