mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2026-04-25 17:26:22 +03:00
[GH-ISSUE #209] Superfences style code triggering MD046 #2027
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#2027
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 @homotechsual on GitHub (Jul 29, 2019).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/209
I've got some documentation code I'm working on automated testing for which belongs to the CiviCRM project.
We use MkDocs to build the content on our documentation site. As part of our automated testing we'd love to properly lint our documentation according to a style guide.
The issue we're facing is that the MkDocs Material theme we're using provides for a helpful admonitions feature and the superfences feature. With these tools we can nest code examples inside handy "highlight" boxes.
Unfortunately it appears that markdownlint is detecting these as indented code blocks and is therefore expecting all other code blocks to be the indented type rather than "fenced".
We'd love to resolve this without turning off the check for inconsistency as this is useful for us.
Example code:
Is there any chance at all that markdownlint would add support for the superfences style syntax?
@nschonni commented on GitHub (Jul 29, 2019):
Probably a duplicate of #207
@DavidAnson commented on GitHub (Jul 29, 2019):
Agreed. I’d prefer to handle non-standard extensions via parser plugins. Per the other issue, there is already one for Admonitions (not sure about SuperFences). If those plugins parse into the expected structure, these custom styles should be handled reasonably by the library without extra effort.
@homotechsual commented on GitHub (Jul 29, 2019):
That makes sense - with regards admonitions/superfences - can these markdownItPlugins be added in vscode-markdownlint ?
@DavidAnson commented on GitHub (Jul 29, 2019):
They are used, but not exposed:
github.com/DavidAnson/vscode-markdownlint@a05bf6e578/extension.js (L365)Referencing custom packages (especially those that have dependencies) is tricky from a VS Code extension - as you might infer from the custom rule example: https://github.com/DavidAnson/vscode-markdownlint#markdownlintcustomrules
If there are popular, well-written plugins, I’m open to adding them by default (as with the math parser above).
@homotechsual commented on GitHub (Jul 29, 2019):
It'd be great to add in the markdown-it-admonition package.
@DavidAnson commented on GitHub (Jul 29, 2019):
Have you tried it and can you confirm that things work well with it? Can you please point to some example files that I could use to try this myself?
@homotechsual commented on GitHub (Jul 29, 2019):
I'll do some more thorough testing tomorrow and give you some repro steps and a repo pointer.
@homotechsual commented on GitHub (Jul 29, 2019):
I'll post the above to the issue queue for DavidAnson/vscode-markdownlint.
Good to close this one I think?