From f9b313cdf257d4d6b97fb1fa8c6de84fa3ff0d5b Mon Sep 17 00:00:00 2001 From: Akos Balasko Date: Mon, 13 Mar 2023 23:14:38 +0100 Subject: [PATCH] fix: default template is in valid YAML format (#460) --- Notes_for_Logseq.md | 2 +- Templates.md | 4 ++-- sampleTemplate.tmpl | 4 ++-- sampleTemplate_logseq.tmpl | 4 ++-- sampleTemplate_tags-array.tmpl | 2 +- src/utils/templates/default-template.ts | 2 +- test/data/keephtml-template.tmpl | 2 +- test/data/multimeta-template.tmpl | 4 ++-- test/data/nolocation-template.tmpl | 2 +- test/data/notebook-template.tmpl | 2 +- test/data/tags-array_template.templ | 2 +- test/data/template_logseq.tmpl | 2 +- test/data/test -note with tags array.md | 2 +- test/data/test-hugeHtml.md | 4 ++-- test/data/test-image-dataUrl.md | 2 +- test/data/test-imageWithoutSrc.md | 2 +- test/data/test-noteWithSourceUrl.md | 2 +- test/data/test-webclip_article.md | 2 +- test/data/test-webclip_bookmark.md | 2 +- test/data/test-webclip_screenshot.md | 2 +- test/data/test-webclip_simplifiedarticle.md | 2 +- test/data/test.dots.in.enex.File.Name.md | 2 +- test/yarle-special-cases.spec.ts | 2 +- 23 files changed, 28 insertions(+), 28 deletions(-) diff --git a/Notes_for_Logseq.md b/Notes_for_Logseq.md index 53f8a062..273f5e0c 100644 --- a/Notes_for_Logseq.md +++ b/Notes_for_Logseq.md @@ -76,7 +76,7 @@ You should use the page template below instead of the default one {created-at-block}- _Created at {created-at}._{end-created-at-block} {updated-at-block}- _Last updated at {updated-at}._{end-updated-at-block} -{source-url-block}- _Source URL: []({source-url})._{end-source-url-block} +{source-url-block}- _Source URL []({source-url})._{end-source-url-block} {tags-block} diff --git a/Templates.md b/Templates.md index 7821afcc..b593cf56 100644 --- a/Templates.md +++ b/Templates.md @@ -52,7 +52,7 @@ This example puts the note title at the top, preceded by `#`. The tags are liste {tags-block} --- -Tags: {tags} +Tags {tags} --- {end-tags-block} @@ -77,7 +77,7 @@ As a starting point, you can edit the `sampleTemplate.tmpl` default template. Do {tags-array-block} --- -Tags: {tags-array} +Tags {tags-array} --- {end-tags-array-block} diff --git a/sampleTemplate.tmpl b/sampleTemplate.tmpl index d1aa78cd..3d8707d0 100644 --- a/sampleTemplate.tmpl +++ b/sampleTemplate.tmpl @@ -2,11 +2,11 @@ {created-at-block}_Created at {created-at}._{end-created-at-block} {updated-at-block}_Last updated at {updated-at}._{end-updated-at-block} -{source-url-block}_Source URL: []({source-url})._{end-source-url-block} +{source-url-block}_Source URL []({source-url})._{end-source-url-block} {tags-block} -Tagged: +Tagged ``` {tags} ``` diff --git a/sampleTemplate_logseq.tmpl b/sampleTemplate_logseq.tmpl index 30ef0567..02cf66e4 100644 --- a/sampleTemplate_logseq.tmpl +++ b/sampleTemplate_logseq.tmpl @@ -11,11 +11,11 @@ {created-at-block}- _Created at {created-at}._{end-created-at-block} {updated-at-block}- _Last updated at {updated-at}._{end-updated-at-block} -{source-url-block}- _Source URL: []({source-url})._{end-source-url-block} +{source-url-block}- _Source URL []({source-url})._{end-source-url-block} {tags-block} -- Tagged: +- Tagged - ``` {tags} diff --git a/sampleTemplate_tags-array.tmpl b/sampleTemplate_tags-array.tmpl index ea08e7fe..7b226015 100644 --- a/sampleTemplate_tags-array.tmpl +++ b/sampleTemplate_tags-array.tmpl @@ -2,7 +2,7 @@ {tags-array-block} --- -Tags: {tags-array} +Tags {tags-array} --- {end-tags-array-block} diff --git a/src/utils/templates/default-template.ts b/src/utils/templates/default-template.ts index f3178d03..669c4853 100644 --- a/src/utils/templates/default-template.ts +++ b/src/utils/templates/default-template.ts @@ -9,7 +9,7 @@ Tag(s): {tags} {created-at-block} Created at: {created-at}{end-created-at-block} {updated-at-block} Updated at: {updated-at}{end-updated-at-block} -{source-url-block} Source URL: {source-url}{end-source-url-block} +{source-url-block} Source URL {source-url}{end-source-url-block} {location-block} Where: {location}{end-location-block} `; diff --git a/test/data/keephtml-template.tmpl b/test/data/keephtml-template.tmpl index eb80bb73..7acd1096 100644 --- a/test/data/keephtml-template.tmpl +++ b/test/data/keephtml-template.tmpl @@ -9,7 +9,7 @@ Tag(s): {tags} {created-at-block} Created at: {created-at}{end-created-at-block} {updated-at-block} Updated at: {updated-at}{end-updated-at-block} -{source-url-block} Source URL: {source-url}{end-source-url-block} +{source-url-block} Source URL {source-url}{end-source-url-block} {link-to-original-block} Link to original content: {link-to-original}{end-link-to-original-block} {location-block} Where: {location}{end-location-block} diff --git a/test/data/multimeta-template.tmpl b/test/data/multimeta-template.tmpl index ce86d789..0de178d3 100644 --- a/test/data/multimeta-template.tmpl +++ b/test/data/multimeta-template.tmpl @@ -4,7 +4,7 @@ {tags-block} Tag(s): {tags}{end-tags-block} {created-at-block} Created at: {created-at}{end-created-at-block} {updated-at-block} Updated at: {updated-at}{end-updated-at-block} -{source-url-block} Source URL: {source-url}{end-source-url-block} +{source-url-block} Source URL {source-url}{end-source-url-block} {notebook-block} Notebook: {notebook}{end-notebook-block} {location-block} Where: {location}{end-location-block} @@ -14,7 +14,7 @@ {created-at-block} Created at: {created-at}{end-created-at-block} {updated-at-block} Updated at: {updated-at}{end-updated-at-block} -{source-url-block} Source URL: {source-url}{end-source-url-block} +{source-url-block} Source URL {source-url}{end-source-url-block} {notebook-block} Notebook: {notebook}{end-notebook-block} {location-block} Where: {location}{end-location-block} diff --git a/test/data/nolocation-template.tmpl b/test/data/nolocation-template.tmpl index 9dced8ea..82c62409 100644 --- a/test/data/nolocation-template.tmpl +++ b/test/data/nolocation-template.tmpl @@ -9,5 +9,5 @@ Tag(s): {tags} {created-at-block} Created at: {created-at}{end-created-at-block} {updated-at-block} Updated at: {updated-at}{end-updated-at-block} -{source-url-block} Source URL: {source-url}{end-source-url-block} +{source-url-block} Source URL {source-url}{end-source-url-block} diff --git a/test/data/notebook-template.tmpl b/test/data/notebook-template.tmpl index b5e44a3a..3bead111 100644 --- a/test/data/notebook-template.tmpl +++ b/test/data/notebook-template.tmpl @@ -9,7 +9,7 @@ Tag(s): {tags} {created-at-block} Created at: {created-at}{end-created-at-block} {updated-at-block} Updated at: {updated-at}{end-updated-at-block} -{source-url-block} Source URL: {source-url}{end-source-url-block} +{source-url-block} Source URL {source-url}{end-source-url-block} {notebook-block} Notebook: {notebook}{end-notebook-block} {location-block} Where: {location}{end-location-block} diff --git a/test/data/tags-array_template.templ b/test/data/tags-array_template.templ index ea08e7fe..7b226015 100644 --- a/test/data/tags-array_template.templ +++ b/test/data/tags-array_template.templ @@ -2,7 +2,7 @@ {tags-array-block} --- -Tags: {tags-array} +Tags {tags-array} --- {end-tags-array-block} diff --git a/test/data/template_logseq.tmpl b/test/data/template_logseq.tmpl index 30ef0567..1a14b26c 100644 --- a/test/data/template_logseq.tmpl +++ b/test/data/template_logseq.tmpl @@ -11,7 +11,7 @@ {created-at-block}- _Created at {created-at}._{end-created-at-block} {updated-at-block}- _Last updated at {updated-at}._{end-updated-at-block} -{source-url-block}- _Source URL: []({source-url})._{end-source-url-block} +{source-url-block}- _Source URL []({source-url})._{end-source-url-block} {tags-block} diff --git a/test/data/test -note with tags array.md b/test/data/test -note with tags array.md index 0888d5e4..ee91615f 100644 --- a/test/data/test -note with tags array.md +++ b/test/data/test -note with tags array.md @@ -2,7 +2,7 @@ --- -Tags: ["tag1","tag2"] +Tags ["tag1","tag2"] --- diff --git a/test/data/test-hugeHtml.md b/test/data/test-hugeHtml.md index 04801bf2..b925bac2 100644 --- a/test/data/test-hugeHtml.md +++ b/test/data/test-hugeHtml.md @@ -4,7 +4,7 @@ Tag(s): #Press-column-fragments Created at: 2015-07-27T17:57:37+01:00 Updated at: 2015-07-27T17:57:38+01:00 - Source URL: http://www.theguardian.com/world/2015/jul/27/dying-for-christianity-millions-at-risk-amid-rise-in-persecution-across-the-globe + Source URL http://www.theguardian.com/world/2015/jul/27/dying-for-christianity-millions-at-risk-amid-rise-in-persecution-across-the-globe Notebook: huge-html --- @@ -346,6 +346,6 @@ View more comments Created at: 2015-07-27T17:57:37+01:00 Updated at: 2015-07-27T17:57:38+01:00 - Source URL: http://www.theguardian.com/world/2015/jul/27/dying-for-christianity-millions-at-risk-amid-rise-in-persecution-across-the-globe + Source URL http://www.theguardian.com/world/2015/jul/27/dying-for-christianity-millions-at-risk-amid-rise-in-persecution-across-the-globe Notebook: huge-html diff --git a/test/data/test-image-dataUrl.md b/test/data/test-image-dataUrl.md index ac5219d9..90292c74 100644 --- a/test/data/test-image-dataUrl.md +++ b/test/data/test-image-dataUrl.md @@ -11,5 +11,5 @@ Created at: 2021-07-17T18:35:45+01:00 Updated at: 2021-07-17T23:33:56+01:00 - Source URL: https://unsplash.com/photos/3ym6i13Y9LU + Source URL https://unsplash.com/photos/3ym6i13Y9LU diff --git a/test/data/test-imageWithoutSrc.md b/test/data/test-imageWithoutSrc.md index f9668c09..78847e8b 100644 --- a/test/data/test-imageWithoutSrc.md +++ b/test/data/test-imageWithoutSrc.md @@ -64,5 +64,5 @@ Some of my qualifications may not be obvious at the moment (e.g. how can scalabi Created at: 2020-01-13T18:38:07+00:00 Updated at: 2020-08-30T18:46:33+01:00 - Source URL: https://medium.com/@nmckinnonblog/microservices-42b09caeb73d + Source URL https://medium.com/@nmckinnonblog/microservices-42b09caeb73d diff --git a/test/data/test-noteWithSourceUrl.md b/test/data/test-noteWithSourceUrl.md index 31b63592..44da1e84 100644 --- a/test/data/test-noteWithSourceUrl.md +++ b/test/data/test-noteWithSourceUrl.md @@ -4,5 +4,5 @@ note with source-url Created at: 2018-10-06T12:46:58+01:00 Updated at: 2018-10-06T12:46:58+01:00 - Source URL: https://en.wikipedia.org/wiki/Evernote + Source URL https://en.wikipedia.org/wiki/Evernote diff --git a/test/data/test-webclip_article.md b/test/data/test-webclip_article.md index 046d7568..48bd754c 100644 --- a/test/data/test-webclip_article.md +++ b/test/data/test-webclip_article.md @@ -117,5 +117,5 @@ sharer.js, passport-evernote-auth, passport-evernote, share-buttons, _yarle_\-_e Created at: 2020-10-18T08:25:40+01:00 Updated at: 2020-10-18T08:25:40+01:00 - Source URL: https://www.google.com/search?sxsrf=ALeKk03bpXQ9mBvZPr4siq9b90rD9F_scA%3A1603005812287&ei=dO2LX9qUEcX1qwGn5brgBQ&q=yarle+evernote&oq=yarle+evernote&gs_lcp=CgZwc3ktYWIQAzIECCMQJzoHCCMQsAMQJzoHCAAQsAMQQzoHCC4QsAMQQzoJCAAQsAMQBxAeOgcIABCwAxAKOgUIABDJAzoCCAA6BAgAEAo6BAguEAo6BwguEMkDEA06BggAEA0QCjoGCAAQDRAeOggIABANEAoQHjoICAAQDRAFEB46CAgAEBYQChAeOgUIIRCgAToHCAAQyQMQDToECAAQDVDdEViJKmD_MGgDcAB4AYAB7gSIAf0RkgEJMC45LjEuNS0xmAEAoAEBqgEHZ3dzLXdpesgBCsABAQ&sclient=psy-ab&ved=0ahUKEwjano6Azr3sAhXF-ioKHaeyDlwQ4dUDCA0&uact=5 + Source URL https://www.google.com/search?sxsrf=ALeKk03bpXQ9mBvZPr4siq9b90rD9F_scA%3A1603005812287&ei=dO2LX9qUEcX1qwGn5brgBQ&q=yarle+evernote&oq=yarle+evernote&gs_lcp=CgZwc3ktYWIQAzIECCMQJzoHCCMQsAMQJzoHCAAQsAMQQzoHCC4QsAMQQzoJCAAQsAMQBxAeOgcIABCwAxAKOgUIABDJAzoCCAA6BAgAEAo6BAguEAo6BwguEMkDEA06BggAEA0QCjoGCAAQDRAeOggIABANEAoQHjoICAAQDRAFEB46CAgAEBYQChAeOgUIIRCgAToHCAAQyQMQDToECAAQDVDdEViJKmD_MGgDcAB4AYAB7gSIAf0RkgEJMC45LjEuNS0xmAEAoAEBqgEHZ3dzLXdpesgBCsABAQ&sclient=psy-ab&ved=0ahUKEwjano6Azr3sAhXF-ioKHaeyDlwQ4dUDCA0&uact=5 diff --git a/test/data/test-webclip_bookmark.md b/test/data/test-webclip_bookmark.md index 85d577d0..b20f8802 100644 --- a/test/data/test-webclip_bookmark.md +++ b/test/data/test-webclip_bookmark.md @@ -8,5 +8,5 @@ Yet Another Rope Ladder from Evernote. Contribute to akosbalasko/yarle developme Created at: 2020-10-17T16:07:59+01:00 Updated at: 2020-10-17T16:07:59+01:00 - Source URL: https://github.com/akosbalasko/yarle + Source URL https://github.com/akosbalasko/yarle diff --git a/test/data/test-webclip_screenshot.md b/test/data/test-webclip_screenshot.md index 3fa10b36..eecd16ea 100644 --- a/test/data/test-webclip_screenshot.md +++ b/test/data/test-webclip_screenshot.md @@ -4,5 +4,5 @@ Created at: 2020-10-17T16:08:28+01:00 Updated at: 2020-10-17T16:08:28+01:00 - Source URL: https://github.com/akosbalasko/yarle + Source URL https://github.com/akosbalasko/yarle diff --git a/test/data/test-webclip_simplifiedarticle.md b/test/data/test-webclip_simplifiedarticle.md index f748033f..9b971588 100644 --- a/test/data/test-webclip_simplifiedarticle.md +++ b/test/data/test-webclip_simplifiedarticle.md @@ -54,5 +54,5 @@ sharer.js, passport-evernote-auth, passport-evernote, share-buttons, _yarle_\-_e Created at: 2020-10-18T08:24:57+01:00 Updated at: 2020-10-18T08:24:57+01:00 - Source URL: https://www.google.com/search?sxsrf=ALeKk03bpXQ9mBvZPr4siq9b90rD9F_scA%3A1603005812287&ei=dO2LX9qUEcX1qwGn5brgBQ&q=yarle+evernote&oq=yarle+evernote&gs_lcp=CgZwc3ktYWIQAzIECCMQJzoHCCMQsAMQJzoHCAAQsAMQQzoHCC4QsAMQQzoJCAAQsAMQBxAeOgcIABCwAxAKOgUIABDJAzoCCAA6BAgAEAo6BAguEAo6BwguEMkDEA06BggAEA0QCjoGCAAQDRAeOggIABANEAoQHjoICAAQDRAFEB46CAgAEBYQChAeOgUIIRCgAToHCAAQyQMQDToECAAQDVDdEViJKmD_MGgDcAB4AYAB7gSIAf0RkgEJMC45LjEuNS0xmAEAoAEBqgEHZ3dzLXdpesgBCsABAQ&sclient=psy-ab&ved=0ahUKEwjano6Azr3sAhXF-ioKHaeyDlwQ4dUDCA0&uact=5 + Source URL https://www.google.com/search?sxsrf=ALeKk03bpXQ9mBvZPr4siq9b90rD9F_scA%3A1603005812287&ei=dO2LX9qUEcX1qwGn5brgBQ&q=yarle+evernote&oq=yarle+evernote&gs_lcp=CgZwc3ktYWIQAzIECCMQJzoHCCMQsAMQJzoHCAAQsAMQQzoHCC4QsAMQQzoJCAAQsAMQBxAeOgcIABCwAxAKOgUIABDJAzoCCAA6BAgAEAo6BAguEAo6BwguEMkDEA06BggAEA0QCjoGCAAQDRAeOggIABANEAoQHjoICAAQDRAFEB46CAgAEBYQChAeOgUIIRCgAToHCAAQyQMQDToECAAQDVDdEViJKmD_MGgDcAB4AYAB7gSIAf0RkgEJMC45LjEuNS0xmAEAoAEBqgEHZ3dzLXdpesgBCsABAQ&sclient=psy-ab&ved=0ahUKEwjano6Azr3sAhXF-ioKHaeyDlwQ4dUDCA0&uact=5 diff --git a/test/data/test.dots.in.enex.File.Name.md b/test/data/test.dots.in.enex.File.Name.md index a4a8dbf7..21a71abf 100644 --- a/test/data/test.dots.in.enex.File.Name.md +++ b/test/data/test.dots.in.enex.File.Name.md @@ -2,7 +2,7 @@ --- -Tags: ["tag1","tag2"] +Tags ["tag1","tag2"] --- diff --git a/test/yarle-special-cases.spec.ts b/test/yarle-special-cases.spec.ts index 93031256..9e7ca376 100644 --- a/test/yarle-special-cases.spec.ts +++ b/test/yarle-special-cases.spec.ts @@ -688,7 +688,7 @@ dateFormat: undefined, skipEnexFileNameFromOutputPath: false, keepMDCharactersOfENNotes: false, monospaceIsCodeBlock: false, - currentTemplate: '{title-block}- #{title}#{end-title-block}\r\n\r\n- \r\n ---\r\n\r\n\r\n{content-block}{content}{end-content-block}\r\n\r\n- \r\n ---\r\n\r\n{created-at-block}- _Created at {created-at}._{end-created-at-block}\r\n{updated-at-block}- _Last updated at {updated-at}._{end-updated-at-block}\r\n{source-url-block}- _Source URL: []({source-url})._{end-source-url-block}\r\n\r\n\r\n{tags-block}\r\n- Tagged: \r\n- \r\n```\r\n{tags}\r\n```\r\n{end-tags-block}', + currentTemplate: '{title-block}- #{title}#{end-title-block}\r\n\r\n- \r\n ---\r\n\r\n\r\n{content-block}{content}{end-content-block}\r\n\r\n- \r\n ---\r\n\r\n{created-at-block}- _Created at {created-at}._{end-created-at-block}\r\n{updated-at-block}- _Last updated at {updated-at}._{end-updated-at-block}\r\n{source-url-block}- _Source URL []({source-url})._{end-source-url-block}\r\n\r\n\r\n{tags-block}\r\n- Tagged: \r\n- \r\n```\r\n{tags}\r\n```\r\n{end-tags-block}', logseqSettings: { journalNotes: false, },