Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Corrupts YAML #958

Closed
3 tasks done
kmaustral opened this issue Dec 4, 2023 · 9 comments
Closed
3 tasks done

Bug: Corrupts YAML #958

kmaustral opened this issue Dec 4, 2023 · 9 comments
Assignees
Labels
bug Something isn't working help wanted Extra attention is needed live-preview resolution/update-made A change has been made that should resolve this issue or request yaml YAML related issues or features

Comments

@kmaustral
Copy link

kmaustral commented Dec 4, 2023

  • I have verified that I am on the latest version of the Linter

Describe the Bug

When choose the command to Lint file, the YAML is corrupted.

How to Reproduce

Using 1.21 Linter

Steps to reproduce the behavior:

For instance:
tags: book

becomes
tags: book
formtags: book

becomes
tags: book
formttags:
d - book

Or

Example to reproduce issue with

example here

Please make sure to include logs and the rule(s) that cause the issue if applicable. You can include logs by going to the debug tab of the Linter and setting the log level to debug. Then enable the capturing of logs and either lint on save or lint the current file. Then go back to the debug tab and you can grab Linter logs from the last run.

If you are not sure which rule(s) may cause the issue, please attach the data.json file located at <vault>/.obsidian/plugins/obsidian-linter/ or copy the config from the debug tab.

Expected Behavior

A clear and concise description of what you expected to happen.

Expected output if applicable:

expected output here

Screenshots

If applicable, add screenshots to help explain your problem.

Device

  • Desktop
  • Mobile

Additional Context

Add any other context about the problem here.

@kmaustral kmaustral added the bug Something isn't working label Dec 4, 2023
@pjkaufman
Copy link
Collaborator

Hey @kmaustral . Could you provide your data.json and a sample file that causes the problem? This will help me reproduce the issue.

@kmaustral
Copy link
Author

Thanks for following this up. Here's a sample note and the data.json file.

20 - Insectopedia.md
data.json

Let me know if there are any issues with this.

@pjkaufman
Copy link
Collaborator

I will have to take a look at this some time later. Something is messing up the YAML according to the report (I have not yet reproduced since I am not yet able to run this against a vault). I will have to determine the exact rule causing the problem later.

I am not seeing anything wrong with the initial YAML, so this is likely an issue with a rule operating on the YAML that should not be or a bug in one of the YAML rules that has gone unnoticed up until now.

@pjkaufman pjkaufman added the yaml YAML related issues or features label Dec 4, 2023
@pjkaufman
Copy link
Collaborator

Hey @kmaustral , just to double check. Are you using live preview when you view a markdown file? I ask because there has been reported bugginess around that that has not been resolved since it does not seem to be consistent across vaults (I have been able to reproduce some instances of it and other times I have not been able to). I just want to rule that out since so far running the following rules individual I am not seeing any output that would cause the issue you are seeing:

  • Format Tags in YAML
  • Sort YAML Keys

@kmaustral
Copy link
Author

kmaustral commented Dec 4, 2023 via email

@pjkaufman pjkaufman added live-preview help wanted Extra attention is needed labels Dec 4, 2023
@wenbopeng
Copy link

same issue using Live Preview

@pjkaufman
Copy link
Collaborator

same issue using Live Preview

This should be fixed in the next release of the Linter. If not, please let us know so we can see why it is still not working.

@pjkaufman pjkaufman added the resolution/update-made A change has been made that should resolve this issue or request label Dec 10, 2023
@pjkaufman
Copy link
Collaborator

I believe this was fixed by #963 .

@pjkaufman
Copy link
Collaborator

If this issue is present on master or in the next release please let us know!

@pjkaufman pjkaufman self-assigned this Dec 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed live-preview resolution/update-made A change has been made that should resolve this issue or request yaml YAML related issues or features
Projects
Archived in project
Development

No branches or pull requests

3 participants