# Preserve single-paired quoted values in YAML keys when using the new Property interface

**URL:** <https://forum.obsidian.md/t/preserve-single-paired-quoted-values-in-yaml-keys-when-using-the-new-property-interface/63824>\
**Category:** Feature archive\
**Tags:** properties, valuable\
**Created:** [July 27, 2023, 1:02am UTC](https://forum.obsidian.md/t/preserve-single-paired-quoted-values-in-yaml-keys-when-using-the-new-property-interface/63824 "2023-07-27T01:02:40Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![sailKite](https://forum.obsidian.md/user_avatar/forum.obsidian.md/sailkite/32/30369_2.png) [@sailKite](https://forum.obsidian.md/u/sailKite)\
**Post date:** [July 27, 2023, 1:02am UTC](https://forum.obsidian.md/t/preserve-single-paired-quoted-values-in-yaml-keys-when-using-the-new-property-interface/63824/1 "2023-07-27T01:02:40Z")

</div>

### Use case or problem

I tested a number of separate approaches for “protecting” formatting on property values (even ones that have been moved into the lineated array syntax) when editing properties through the interface, and found that the only protected syntaxes are `'"ex"'` and `"'ample'"` , which for the purposes of tags at the very least are quite cumbersome. The tags will assume a “true” form of `#"ex"` and `#'ample'` respectively (henceforth “double-paired” strings).

Additionally, modifying _any_ property or adding a new property will fully reformat all entries excepting those that are “protected” in the manner described above—yet if this is deliberately avoided through only modifying the YAML through Source Mode, single-paired strings will still be appropriately recognized as tags.

### Proposed solution

Personally I’d like to see at least one of two options:

1. The forced formatting should be reduced or made more permissive, such that single-quoted values may be preserved since they are already recognized by the app and function correctly even in the Catalyst build of v.1.4.0.
2. The YAML Frontmatter should be made to either explicitly disallow single-paired values with regards to native functionality, such that the following would no longer be recognized as valid tag syntax for _any_ native features of the app.

```yaml
tags:
  - "#ex"
  - '#ample'

```

### Current workaround

The only present solution is to avoid using the Property interface and only edit the YAML Frontmatter in Source Mode or through external text editors / programmatic methods.

### Related feature requests

None at present, will be updated as brought to attention.

### Thanks and Miscellanea

This issue was opened following and initial observation by @mediapathic , and his insights and suggestions regarding this feature request should be taken with greater priority than mine since it directly affects much of his work.

---

<div class="post-metadata">

**Author:** ![Nightowl](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/n/d2c977/32.png) [@Nightowl](https://forum.obsidian.md/u/Nightowl)\
**Post date:** [August 4, 2023, 1:12pm UTC](https://forum.obsidian.md/t/preserve-single-paired-quoted-values-in-yaml-keys-when-using-the-new-property-interface/63824/2 "2023-08-04T13:12:58Z")

</div>

### Steps to reproduce

Add YAML front matter to a file that includes the key “tags” and as value a list of tags formatted as `'#tagname'` (valid tag, valid YAML due to inclusion of single quotes), e.g.:

```auto
tags:
    - '#meeting'
    - '#work'

```

Now edit the tags inside Obsidian as part of the file Properties, e.g. by adding another tag.

### Did you follow the [troubleshooting guide](https://forum.obsidian.md/t/about-the-bug-reports-category/24/10)? [Y/N]

Y

### Expected result

The formatting of the existing tags is not changed.  
Ideally: New tags use the same formatting. (A setting to handle this would also be great.)

### Actual result

Tags are reformatted, the preceding hash sign is stripped.  
The above example would look like this:

```auto
tags:
    - meeting
    - work

```

### Environment

SYSTEM INFO:  
Obsidian version: v1.4.2  
Installer version: v1.2.8  
Operating system: #1 SMP PREEMPT\_DYNAMIC Mon, 24 Jul 2023 20:19:38 +0000 6.4.6-arch1-1  
Login status: logged in  
Catalyst license: supporter  
Insider build toggle: on  
Live preview: on  
Legacy editor: off  
Base theme: dark  
Community theme: none  
Snippets enabled: 0  
Restricted mode: on

RECOMMENDATIONS:  
none

* * *

### Additional information

The reason I see the behavior as a problem is that it breaks any workflow outside of Obsidian that relies on finding tags in the files by looking for words preceded directly by a hash sign. Parsing the front matter YAML is not an alternative as that is vastly more complicated and not even possible in some circumstances where only simple text search is available.

---

<div class="post-metadata">

**Author:** ![WhiteNoise](https://forum.obsidian.md/user_avatar/forum.obsidian.md/whitenoise/32/11_2.png) [@WhiteNoise](https://forum.obsidian.md/u/WhiteNoise)\
**Post date:** [August 6, 2023, 3:04pm UTC](https://forum.obsidian.md/t/preserve-single-paired-quoted-values-in-yaml-keys-when-using-the-new-property-interface/63824/3 "2023-08-06T15:04:55Z")

</div>

Split this topic on August 6, 2023, 3:04pm UTC

12 posts were merged into an existing topic: [Properties: Do not strip hashtags in tags](https://forum.obsidian.md/t/properties-do-not-strip-hashtags-in-tags/64466/5)

---

<div class="post-metadata">

**Author:** ![WhiteNoise](https://forum.obsidian.md/user_avatar/forum.obsidian.md/whitenoise/32/11_2.png) [@WhiteNoise](https://forum.obsidian.md/u/WhiteNoise)\
**Post date:** [August 6, 2023, 3:05pm UTC](https://forum.obsidian.md/t/preserve-single-paired-quoted-values-in-yaml-keys-when-using-the-new-property-interface/63824/4 "2023-08-06T15:05:14Z")

</div>

Split this topic on August 6, 2023, 3:05pm UTC

A post was merged into an existing topic: [Properties: Do not strip hashtags in tags](https://forum.obsidian.md/t/properties-do-not-strip-hashtags-in-tags/64466)

---

<div class="post-metadata">

**Author:** ![system](https://forum.obsidian.md/uploads/default/original/3X/b/e/bec35fbd23ab28909bb6bfe62cb32eb82dd34019.png) [@system](https://forum.obsidian.md/u/system)\
**Post date:** [November 4, 2023, 3:06pm UTC](https://forum.obsidian.md/t/preserve-single-paired-quoted-values-in-yaml-keys-when-using-the-new-property-interface/63824/5 "2023-11-04T15:06:05Z")

</div>

Closed on November 4, 2023, 3:06pm UTC

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
