mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2026-04-26 01:36:03 +03:00
[GH-ISSUE #270] Error MD022 rule trigged when frontmatter is in JSON format #231
Labels
No labels
bug
enhancement
enhancement
enhancement
fixed in next
fixed in next
fixed in next
new rule
new rule
new rule
pull-request
question
refactoring
refactoring
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/markdownlint#231
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @andreamussap on GitHub (Apr 1, 2020).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/270
In Axway open documentation project we use VScode with DavidAnson/ markdownlint plugin. Each of our pages starts with a frontmatter/heading either in YAML or JSON format.
Issue
We've notice that when the frontmatter is in JSON format, the plugin triggers the MD022 rule, which shows a markdown error. This creates a lot of work for the writes who have to edit the page just to add one line between the JSON frontmatter and the heading, and create a new commit in the pull request.
Everything works fine though when the frontmatter is in YAML format.
Hence, I'd like to ask you if you can make the MD022 rule work for JSON frontmatter, that is, do not show a markdown error when there's no blank line between the frontmatter and the heading.
Thanks, Andrea.
@DavidAnson commented on GitHub (Apr 1, 2020):
If you were using the library directly, you could configure this yourself: https://github.com/DavidAnson/markdownlint/blob/master/README.md#optionsfrontmatter
However, I don’t think that configuration is exposed through either the CLI or VS Code extension.
I need to think about whether to add support for JSON front matter to the library by default, or expose this setting through the tools, or perhaps expose the settings object through the tools.
@andreamussap commented on GitHub (Apr 21, 2020):
Hi @DavidAnson just to rectify the information in the description of the ticket:
So, I'm looking forward to the implementation of this enhancement, it's going to be of great help in my project.
Thanks,
/Andrea
@DavidAnson commented on GitHub (Apr 21, 2020):
Understood! This will probably be part of the next round of updates (library->extension->CLI).