Skip to content

buttonpusher .buttonpusher Online Meta-Bind - Removing quotes from existing frontmatter fields? #278

@buttonpushertv

Description

@buttonpushertv

Please fill out these Check-boxes

  • I checked that the plugin is up to date
  • The issue persist with all other plugins and themes disabled

This Issue Occurs on

  • Windows
  • Linux
  • macOS
  • Android
  • iOS

Plugin Version

1.0.2

Describe the Issue

When using Meta-Bind on a file that is created via a template, where some of the fields are pre-populated & those fields have values surrounded by quotes (single or double), and then I use a Meta-Bind textarea input to enter a quick note or an INPUT from a Input Field Template for capture within the frontmatter, all of the pre-populated fields lose their existing quote marks.

Is this controlled by a setting within Meta-Bind settings? Or is this expected (or unexpected) behavior?

Images attached of before and after changing the campaignStatus value via an INPUT of defined values.
BEFORE

AFTER

This is the top portion of the template that generates the data seen in the images above. As you can see, the template assigns the values to the frontmatter when creating the file initially, as shown in BEFORE. Making a change to any of the values in the metadata callout will strip all the quote marks from the whole frontmatter section:

---
campaignName: '{{VALUE:newCampaignName}}'
campaignPath: "{{VALUE:newCampaignPath}}"
campaignShortCode: "{{VALUE:newCampaignShortCode}}"
campaignHomeNote: "{{VALUE:newCampaignHomeNote}}"
campaignAtlas: "{{VALUE:newCampaignAtlas}}"
campaignCalendar: "{{VALUE:newCampaignCalendar}}"
campaignStatus: 
campaignSystem:
tags:
- campaign
---

> [!metadata|metadata]- Metadata 
>> [!metadata|metadataoption]+ System
>> #### System
>>  |
>> ---|---|
> **Tags** | `INPUT[Tags][inlineListSuggester:tags]` |
> **Game System**|`INPUT[textArea:campaignSystem]`
>
>> [!metadata|metadataoption]- Art
>> #### Art
>>  |
>> ---|---|
>> **Art** | `INPUT[imageSuggester(optionQuery("")):campaignArt]` |
>
>> [!metadata|metadataoption]+ Info
>> #### Info
>>  |
>> ---|---|
>> **Aliases** | `INPUT[list:aliases]` |
>> **Quick Notes** |  `INPUT[textArea:quicknote]`
>> **Status** | `INPUT[Status][:\'campaignStatus\']` |

Steps to Reproduce

  1. Create a file that contains frontmatter fields where the values are wrapped in quote (single or double)
  2. Make a change to the frontmatter via a Meta-Bind field
  3. The existing frontmatter fields will lose their quote marks entirely.

Expected Behavior

I feel that Meta-Bind should not make changes to frontmatter fields that it is not being tasked with updating. I did see that there is a possible bug in core Obsidian that could cause malformation of YAML fields, but I don't think this is the same issue - the YAML just loses the quotes. Noting else is changed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugUndesired behavior caused by this plugin

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions