From d7c3f24b60454ea019601984e7d730718fdb9d73 Mon Sep 17 00:00:00 2001 From: eauriel Date: Mon, 12 Feb 2024 20:55:17 +0100 Subject: [PATCH 1/6] Update main.ts --- src/main.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main.ts b/src/main.ts index d66e6ad..2f2ffbc 100755 --- a/src/main.ts +++ b/src/main.ts @@ -1483,7 +1483,8 @@ export default class MyPlugin extends Plugin { if (this.settings.isTagHash == true) { for (let index = 0; index < lineElements.inlineTagsArray.length; index++) { - lineElements.inlineTagsArray[index] = lineElements.inlineTagsArray[index].replace(/ /g, "") + // lineElements.inlineTagsArray[index] = lineElements.inlineTagsArray[index].replace(/ /g, "") + lineElements.inlineTagsArray[index] = lineElements.inlineTagsArray[index].replace(/ /g, "_") } //{} } From 0fa4ef1f55c005101ee83731bf37bb1a7f5243a9 Mon Sep 17 00:00:00 2001 From: eauriel Date: Mon, 12 Feb 2024 20:56:13 +0100 Subject: [PATCH 2/6] Update utils.ts --- src/utils.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/utils.ts b/src/utils.ts index 40cf043..e83a39d 100755 --- a/src/utils.ts +++ b/src/utils.ts @@ -48,7 +48,11 @@ export function replaceTemplate( export const makeWiki = (str: string) => "[[" + str + "]]"; export const makeQuotes = (str: string) => '"' + str + '"'; -export const makeTags = (str: string) => "#" + str; +// export const makeTags = (str: string) => "#" + str; +// replace in-tag spaces with a underscore (add tag format settings in config later) +// I assume str is tag from zotero item or PDF note as-it-is +export const makeTags = (str: string) => "#" + str.replace(/\s+/g, '_'); + export const createAuthorKey = (creators: CreatorArray) => { const authorKey: string[] = []; From 507bb66deb1d89811c7ba662e6928872d847821a Mon Sep 17 00:00:00 2001 From: eauriel Date: Mon, 12 Feb 2024 21:15:47 +0100 Subject: [PATCH 3/6] Update main.js --- release/bibnotes/main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/release/bibnotes/main.js b/release/bibnotes/main.js index 3aaeb17..f86830a 100644 --- a/release/bibnotes/main.js +++ b/release/bibnotes/main.js @@ -1568,7 +1568,7 @@ function replaceTemplate(stringAdd, find, replace) { } var makeWiki = (str) => "[[" + str + "]]"; var makeQuotes = (str) => '"' + str + '"'; -var makeTags = (str) => "#" + str; +var makeTags = (str) => "#" + str.replace(/\s+/g, '_'); var createAuthorKey = (creators) => { const authorKey = []; const editorKey = []; @@ -5144,7 +5144,7 @@ var MyPlugin = class extends import_obsidian6.Plugin { } if (this.settings.isTagHash == true) { for (let index = 0; index < lineElements.inlineTagsArray.length; index++) { - lineElements.inlineTagsArray[index] = lineElements.inlineTagsArray[index].replace(/ /g, ""); + lineElements.inlineTagsArray[index] = lineElements.inlineTagsArray[index].replace(/ /g, "_"); } } const TempTag = lineElements.inlineTagsArray.map((i2) => tagPrepend + tagFormatBefore + i2 + tagFormatAfter); From f643278a03e4e8bb55a96b1d0ca5f7b252a2f6f8 Mon Sep 17 00:00:00 2001 From: eauriel Date: Mon, 12 Feb 2024 21:18:42 +0100 Subject: [PATCH 4/6] Update manifest.json --- release/bibnotes/manifest.json | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/release/bibnotes/manifest.json b/release/bibnotes/manifest.json index a01288a..c97eb66 100644 --- a/release/bibnotes/manifest.json +++ b/release/bibnotes/manifest.json @@ -1,11 +1,10 @@ { "id": "bibnotes", "name": "BibNotes Formatter", - "version": "0.9.219", + "version": "0.9.220", "minAppVersion": "0.12.0", "description": "Plugin to import and format annotations from Zotero.", "author": "Stefano Pagliari", "authorUrl": "https://www.stefanopagliari.net", "isDesktopOnly": true, - "repo": "stefanopagliari/bibnotes" -} \ No newline at end of file +} From 14c79e787e6dd5c2d9a5522ddc0caa722204d2a8 Mon Sep 17 00:00:00 2001 From: eauriel Date: Mon, 12 Feb 2024 21:19:31 +0100 Subject: [PATCH 5/6] Update package.json --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 41b8cb6..4538486 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bibnotes", - "version": "0.9.219", + "version": "0.9.220", "description": "Plugin to export and format annotations from Zotero into Obsidian", "main": "main.js", "scripts": { @@ -30,4 +30,4 @@ "tslint": "^6.1.3", "turndown": "^7.1.1" } -} \ No newline at end of file +} From 64c9e8dbae743da37ada77e1b06e4d0b5b828a97 Mon Sep 17 00:00:00 2001 From: eauriel Date: Mon, 12 Feb 2024 21:22:47 +0100 Subject: [PATCH 6/6] Update manifest.json --- manifest.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/manifest.json b/manifest.json index a01288a..69c3be8 100644 --- a/manifest.json +++ b/manifest.json @@ -1,11 +1,11 @@ { "id": "bibnotes", "name": "BibNotes Formatter", - "version": "0.9.219", + "version": "0.9.220", "minAppVersion": "0.12.0", "description": "Plugin to import and format annotations from Zotero.", "author": "Stefano Pagliari", "authorUrl": "https://www.stefanopagliari.net", "isDesktopOnly": true, "repo": "stefanopagliari/bibnotes" -} \ No newline at end of file +}