-
-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Unrelated frontmatter being modified when modifying via table #117
Comments
hi @PaperOrb In your image, those fields than lose their commas looks like they do not need it but url field cause it contains “:” Could you attach the db file and some example with the original text to test it? I cant see what’s the problem |
Hey @RafaelGB, here's the DB and a file to test it with: |
thanks! Will be added to bugs in roadmap |
The notes seem to be generated by my Media DB Plugin. For that plugin, I wrote my own YAML stringifier that consistently adds quotation marks around strings. Mostly because I prefer it that way. I am guessing that the db folder plugin replaces the entire frontmatter block and uses the obsidian API YAML stringifier for that. |
hi @mProjectsCode . I am afraid that the plugin use the dataview parser with all the fields. I added a proxy between to give it some value with quotes in some cases. I can add more uses cases to fix your issue |
thanks for the quick answer. I personally think a setting to always add quotation marks to strings would be nice. That also seems to be the simplest way to resolve the small "conflict" between our plugins. I will also work on an option to only add quotation marks only where it is necessary for my plugin. |
We can collaborate to obtain the best parsing. In src/services/DataviewService.ts is the behaviour of the writing quotes: private handleMarkdownBreaker(value: string, isInline?: boolean): string {
if (isInline) {
return value;
}
// Check possible markdown breakers of the yaml
if (MarkdownBreakerRules.INIT_CHARS.some(c => value.startsWith(c)) ||
MarkdownBreakerRules.BETWEEN_CHARS.some(rule => value.includes(rule)) ||
MarkdownBreakerRules.UNIQUE_CHARS.some(c => value === c)) {
value = value.replaceAll(`"`, `\\"`);
return `"${value}"`;
}
return value;
} |
New property added to select your editing preferences Screen.Recording.2022-06-21.at.22.51.06.mov |
Looks great, except that it also adds quotation marks around non-strings like booleans and numbers. |
Fixed too :) |
Selecting a personalRating:
Causes modifications to unrelated fields inside the note which breaks things:
Here's the settings for that personalRating column:
Using Ubuntu 21.04 with obsidian 0.14.15
The text was updated successfully, but these errors were encountered: