Skip to content

Commit

Permalink
hotfix
Browse files Browse the repository at this point in the history
  • Loading branch information
RafaelGB committed Dec 27, 2022
1 parent 7a8e0db commit 60e4f1a
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 9 deletions.
2 changes: 1 addition & 1 deletion manifest-beta.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "dbfolder",
"name": "DB Folder",
"version": "3.1.1",
"version": "3.1.2",
"minAppVersion": "1.1.1",
"description": "Folder with the capability to store and retrieve data from a folder like database",
"author": "RafaelGB",
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "dbfolder",
"name": "DB Folder",
"version": "3.1.1",
"version": "3.1.2",
"minAppVersion": "1.1.1",
"description": "Folder with the capability to store and retrieve data from a folder like database",
"author": "RafaelGB",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "obsidian-dbfolder",
"version": "3.1.1",
"version": "3.1.2",
"description": "This is a sample plugin for Obsidian (https://obsidian.md)",
"main": "main.js",
"scripts": {
Expand Down
20 changes: 14 additions & 6 deletions src/services/ParseService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -279,13 +279,13 @@ class Parse {
break;
// By default. Use markdown parser
default:
auxMarkdown = this.parseToMarkdown(wrapped, localSettings, isInline);
auxMarkdown = this.parseToMarkdown(wrapped, localSettings, isInline).toString();
}
return auxMarkdown;
}

private parseToMarkdown(wrapped: WrappedLiteral, localSettings: LocalSettings, isInline: boolean, wrapQuotes = false): string {
let auxMarkdown = '';
private parseToMarkdown(wrapped: WrappedLiteral, localSettings: LocalSettings, isInline: boolean, wrapQuotes = false): Literal {
let auxMarkdown: Literal;
switch (wrapped.type) {
case 'boolean':
case 'number':
Expand All @@ -299,8 +299,10 @@ class Parse {
localSettings,
isInline
)
)
.join(', ');
);
if (isInline) {
auxMarkdown = auxMarkdown.join(', ');
}
break;
case 'link':
auxMarkdown = wrapped.value.markdown();
Expand All @@ -325,7 +327,13 @@ class Parse {
default:
auxMarkdown = wrapped.value?.toString().trim();
}
return wrapQuotes ? this.handleYamlBreaker(auxMarkdown) : auxMarkdown;

const wrappedResponse = DataviewService.wrapLiteral(auxMarkdown);
if (wrappedResponse.type === 'string') {
return wrapQuotes ? this.handleYamlBreaker(wrappedResponse.value) : wrappedResponse.value;
} else {
return wrappedResponse.value;
}
}

private parseArrayToText(array: Literal[], localSettings: LocalSettings): string {
Expand Down

0 comments on commit 60e4f1a

Please sign in to comment.