Open the attached file with an external editor. Select all text and copy it to the clipboard.
Open Obsidian create a new note and paste the text.
The front matter appears in red because Properties detected two syntax errors: Line 2: “title: PTPL 065: On Clarifying…” and line 3: “ile_title: PTPL 065: On Clarifying…”
IMHO no errors in the front matter. The two colons are part of value and values can have colons.
Actual result
Obsidian Properties plugin interprets the colons as an issue.
Observe the colons have not been entered using the Properties User Interface. If you use the Properties UI to type colons, all works fine.
So I think may be a parser problem.
Environment
SYSTEM INFO:
Obsidian version: v1.4.3
Installer version: v1.3.7
Operating system: Darwin Kernel Version 23.0.0: Tue Aug 1 03:25:23 PDT 2023; root:xnu-10002.0.242.0.6~31/RELEASE_X86_64 23.0.0
Login status: logged in
Catalyst license: insider
Insider build toggle: on
Live preview: on
Legacy editor: off
Base theme: dark
Community theme: none
Snippets enabled: 0
Restricted mode: on
FWIW, the YAML fails in 1.3.7 but parses cleanly if the lines are wrapped in straight quotes:
---
title: "PTPL 065: On Clarifying Your Most Basic Productivity Foundations"
file_title: "PTPL 065: On Clarifying Your Most Basic Productivity Foundations"
published: 2023-08-14T01:01:55.070Z
modified:
captured: 2023-08-15 08:41:14
author: Ellane W
type: article
locale: en
publisher: Medium
site:
topics:
abstract: PLUS a reminder that stepping stones don't need to be made of polished marble
remarks:
url: https://medium.com/produclivity/ptpl-065-on-clarifying-your-most-basic-productivity-foundations-b09df1baa609
score:
revised:
---
# PTPL 065: On Clarifying Your Most Basic Productivity Foundations
([PTPL 065: On Clarifying Your Most Basic Productivity Foundations](https://medium.com/produclivity/ptpl-065-on-clarifying-your-most-basic-productivity-foundations-b09df1baa609))
After validating the YAML using 2 online YAML validators, both values for the keys title and file_title appears to be problematic without being quoted so I don’t think this would qualify as a bug as it seems to be an issue with the initial YAML formatting …
If you copy/paste the string PTPL 065: On Clarifying Your Most Basic Productivity Foundations as it is directly within Properties for the key title (for example), Obsidian automatically surrounds it with double-quotes in the YAML to make it work .
From YAML documentation, I don’t think it’s the colon (:) in itself that’s effectively the issue but the colon + space (: )
E.g.:
---
t-1: "PTPL 065: On Clarifying Your Most Basic Productivity Foundations"
t-2: PTPL 065:On Clarifying Your Most Basic Productivity Foundations
---
Yes, it’s the way YAML handles values. Without quotes, or if you use single quotes it does its best to not interpret the value as a string, and that what breaks it. To force a string you use double quotes. Be careful, if you want the value to be a number, or boolean, do not use double quotes, use single quotes instead, or don’t use any at all.
The parser didn’t fail because the YAML were produced by an external editor per se.
It failed, apparently, because the YAML created within the external editor were invalid (as they don’t seem to follow YAML strict formatting rules) .
In this case, because the string contains a colon directly followed by a space character (: ), the whole sentence would require to be quoted (surrounding it by double-quotes (") ) per YAML formatting rules.
The YAML parser/Properties only works with valid YAML key/value pairs which follows YAML formatting rules…
So, if the YAML it has to handle are invalid, it will just indicate that there’s an issue by “highlighting” the whole thing in red and will wait for you to correct what needs to be corrected…
A small tip to avoid this kind of problem would be to use an online YAML validator before importing adding the file into Obsidian .
… or maybe take a look at the plugin Linter : a whole section of that plugin is dedicated to YAML and could help you to transform invalid YAML into valid ones (the YAML parser / Properties should then be able to pick it up without troubles)
We just use YAML and there aren’t any flavors of it (unlike markdown). So you pick up any YAML guide and use any YAML linter. That’s not gonna be as easy as markdown and that’s why the need for UI.
Regarding this bug report. It’s not a bug, you manually entered incorrectly formatted YAML. You do need quotation marks in this case.
In JS/TS single squared brackets ([]) are arrays/lists and same goes for YAML: so single squared brackets ([]) can be used to indicate a list of values
Both format of list are valid in terms of YAML but Obsidian, at the moment, forces the use of the list-1 format for lists
Those are for wikilinks .
But, because single squared brackets can be used to indicate a list of values, they need to be explicitly inserted as strings (with the whole link surrounded by double/single-quotes) to avoid confusion (as it could be read as a list of lists of values without being quoted)
I’ve disabled automatic updates … going to stay on 1.3.7 until I really understand Properties and the impact it will have on thousands of notes and queries.
Ok. But if I use the Obsidian Properties editor and I write a value with a colon, it works. And the parser says OK. And it says OK because the Obsidian Properties Editor is smart: detects the colon and adds quotes before and after the text automatically. So is really a Good editor.