From 3f996fd04e38b1e6c2a116673d8599310230b76f Mon Sep 17 00:00:00 2001 From: Hongbo Wu Date: Fri, 28 Apr 2023 10:36:09 +0800 Subject: [PATCH] fix: wrap value in frontmatter with double quotes --- src/settings/template.ts | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/settings/template.ts b/src/settings/template.ts index 5b58e51..6267258 100644 --- a/src/settings/template.ts +++ b/src/settings/template.ts @@ -1,7 +1,6 @@ import Mustache from "mustache"; import { stringifyYaml } from "obsidian"; import { Article, HighlightType, PageType } from "../api"; -// import { downloadFileAsAttachment } from "../main"; import { compareHighlightsInFile, formatDate, @@ -11,19 +10,19 @@ import { } from "../util"; export const DEFAULT_TEMPLATE = `--- -id: {{{id}}} -title: {{{title}}} +id: "{{{id}}}" +title: "{{{title}}}" {{#author}} -author: {{{author}}} +author: "{{{author}}}" {{/author}} {{#labels.length}} tags: -{{#labels}} - {{{name}}} +{{#labels}} - "{{{name}}}" {{/labels}} {{/labels.length}} -date_saved: {{{dateSaved}}} +date_saved: "{{{dateSaved}}}" {{#datePublished}} -date_published: {{{datePublished}}} +date_published: "{{{datePublished}}}" {{/datePublished}} ---