Skip to content
This repository has been archived by the owner on Mar 27, 2023. It is now read-only.

Tags that use tabs for indentation cause the tabs sidebar to fail to display any tags #41

Open
estimmel opened this issue Jan 30, 2019 · 3 comments

Comments

@estimmel
Copy link

No description provided.

@estimmel
Copy link
Author

I think this is because the header is specified as YAML and YAML doesn't support tabs, but it would be helpful if the extension could let me know that's why it's failing. Is it possible to handle this more gracefully, especially for those of us who aren't that familiar with YAML's strict requirements

image

@wolfhoundjesse
Copy link
Collaborator

Maybe we can check for Tabs once we've parsed it with gray-matter, and if found, we can send a notification requesting the user change their workspace settings to convert Tabs to spaces.

@wolfhoundjesse
Copy link
Collaborator

Here's what I've found so far:

We're working with Node Buffer objects which do not come with string manipulation, so simply checking for tabs and replacing them with spaces only works if we are willing to convert Buffers to strings. I'm not sure what the overhead would be.

gray-matter itself doesn't have any advice on this issue, and the dependency it uses for parsing YAML, js-yaml, is facing this same discussion here

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants