-
-
Notifications
You must be signed in to change notification settings - Fork 82
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
Issue: FrontMatter changes front matter line length #518
Comments
Thanks @davidsneighbour, found the issue. It seems to be caused by the YAML parser. I did an update to it, and now it should not break your lines anymore. Let me know if this fixed it for you in the beta version. |
Yes, that fixes it. Thank you :) |
I hate to be of bother ;) But now it removes all empty lines that I use just to keep an overview over the front matter. That is ok and valid and I think the initial issue is worse than that, but maybe it's easy to save empty lines the front matter? (Or it's maybe another issue? Still using the Beta Version) |
No worries, we need to get this right. The issue is in one of the YAML parsers, one has a setting to set a line length, but seems to remove other things, and the other one keeps things in place but doesn't have a line length setting. |
Just saw that with the latest version of the YAML parser, there is a line width option. I just updated the dependency and made the change. This gets the old experience back + the fix for the line width. |
It appears this did not make it into 8.4.0 or got somehow broken again. Saving markdown files removes empty lines currently in v8.4.0. The line length is working. edit: not sure if a closed issue arrives on your notifications, so I'll ping you @estruyf ;) |
Describe the bug
It appears the frontmatter functionality that updates the dates on save is also formatting the frontmatter. I have a line with the length of >80, but below 120 and after each save that line is ripped onto two lines. Now, while this is done properly (yaml, second line of a parameter is indented by 2 extra spaces) it might/will break other parsers that want to go over frontmatter. It would be nice to be able to either configure it to a certain line length or be able to disable it.
I am not 100% sure that it is FrontMatter doing this, but I disabled all Markdown extensions, eslint and prettier and it still cut the line in two, after disabling frontmatter this stopped.
sample:
ends up as:
The text was updated successfully, but these errors were encountered: