obsidian-linter: Bug: YAML from share as gist plugin invalid...

Describe the Bug

The YAML generated by the “share as a gist” plugin (https://github.com/timrogers/obsidian-share-as-gist) is flagged as invalid by Linter. I’m no YAML expert, but it seems ok to me?

gists:
  - id: 4d06d592f0b0ae1771c0012de3562d8d
    url: 'https://gist.github.com/4d06d592f0b0ae1771c0012de3562d8d'
    createdAt: '2022-11-01T16:07:48Z'
    updatedAt: '2022-11-01T16:35:11Z'
    filename: Stochastic P1.md
    isPublic: true

How to Reproduce

Install the plugin, create the github key, share an obsidian page as a gist. YAML header is automatically generated to hold the resulting metadata.

When Linting the file with the above YAML, the following error message is put to the console:

Lint File Error in File ...:
YAMLException: bad indentation of a sequence entry (3:5)

 1 | gists:
 2 |   - "id: 4d06d592f0b0ae1771c0012de35 ...
 3 |     url: 'https://gist.github.com/4d ...
---------^
 4 |     createdAt: '2022-11-01T16:07:48Z'
 5 |     updatedAt: '2022-11-01T16:35:11Z'
    at du (plugin:obsidian-linter:18:944)
    at q (plugin:obsidian-linter:18:978)
    at Ul (plugin:obsidian-linter:25:696)
    at Kn (plugin:obsidian-linter:25:4861)
    at md (plugin:obsidian-linter:25:2150)
    at Kn (plugin:obsidian-linter:25:4870)
    at gd (plugin:obsidian-linter:25:7247)
    at hu (plugin:obsidian-linter:26:258)
    at bd (plugin:obsidian-linter:26:469)
    at ot (plugin:obsidian-linter:48:223)

Expected Behavior

Should not flag as bad YAML?

Screenshots

image

Device

  • Desktop
  • Mobile

Additional Context

If it is a problem with the gist plugin please share details so I can communicate that back to him.

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 18

Most upvoted comments

Yes. The YAML in my bug report is the entire block.