Issue: comma separated arrays #472

Closed
opened 2026-10-05 02:49:03 +02:00 by adam · 2 comments
Owner

Describe the bug
I need to use comma separated arrays in front matter.

---
test: ["a", "b"]
---

But it is automatically formatted as

---
test:
  - a
  - b
---

I tried the following settings

"frontMatter.taxonomy.commaSeparatedFields": [
    "test"
]

However, it is automatically formatted as

---
test: a, b
---

but what I actually need is

---
test: ["a", "b"]
---

Is there any way to solve this problem?

Desktop (please complete the following information):

  • OS: Windows 11
  • VSCode 1.79.2
  • Front Matter v8.4.0
**Describe the bug** I need to use comma separated arrays in front matter. ```yaml --- test: ["a", "b"] --- ``` But it is automatically formatted as ```yaml --- test: - a - b --- ``` I tried the following settings ```json "frontMatter.taxonomy.commaSeparatedFields": [ "test" ] ``` However, it is automatically formatted as ```yaml --- test: a, b --- ``` but what I actually need is ```yaml --- test: ["a", "b"] --- ``` Is there any way to solve this problem? **Desktop (please complete the following information):** - OS: Windows 11 - VSCode 1.79.2 - Front Matter v8.4.0 <!-- github-sync-id:1788954333 -->
adam closed this issue 2026-10-05 02:49:03 +02:00
Author
Owner

@HareToAme Unfortunately this is not possible, internally we use a dependency that converts JSON to YAML and it does not support single-line arrays.

@HareToAme Unfortunately this is not possible, internally we use a dependency that converts JSON to YAML and it does not support single-line arrays. <!-- github-comment-id:1621303579 -->
Author
Owner

Thanks for your answer.

Thanks for your answer. <!-- github-comment-id:1621455334 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/vscode-front-matter#472