question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bug: YAML from share as gist plugin invalid...

See original GitHub issue

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.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:18

github_iconTop GitHub Comments

1reaction
olearydjcommented, Nov 1, 2022

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

0reactions
pjkaufmancommented, Nov 18, 2022

This should be fixed on master and in the next release. If it is not, please let us know. Thanks for helping make the Linter more robust.

Read more comments on GitHub >

github_iconTop Results From Across the Web

invalid gist id #388 - shanalikhan/code-settings-sync - GitHub
Hello I have an error after entering gist on another vscode. ... is the GIST ID). You must share the same valid token-gistID...
Read more >
How to Use GitHub gists Effectively - Liquid Web
You can use multiple methods to share a gist. You can: Embed it into a website. Copy a shareable link to send. Clone...
Read more >
`yaml invalid: undefined error` when `git fsck` reports ... - GitLab
It happens for all projects, with any valid, simple .gitlab-ci.yml file that was working before. The GitLab server gets in to an irreversible ......
Read more >
Azure DevOps Pipeline - YAML formatting error?
You have a task (i.e. the first thing in the file) outside of a scope in which it's valid, which would be under...
Read more >
Lint YAML in VS Code | Extension Highlight - YouTube
Why is YAML so hard!? The YAML extension not only helps you write valid YAML, but with schemas, it helps you discover parameters...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found