-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Markdown linting: Code block style (MD046) #5253
Comments
Hi, @dshevtsov ! I have a question about MD046 rule. For example, when this rule is active it reports issues:
If you open README.md and check lines 160 and 170 you will see code blocks: Should we ignore this report or the marked code blocks are incorrect? Thank you! |
@atwixfirster, a code bock have to be aligned with first symbol of text in the parent ordered list item. |
Thank you for the explanations, @dshevtsov! Per my opinion the This is a big piece of manual work. |
@jeff-matthews , does someone from DevDocs team work on this issue? Thank you! |
@atwixfirster, thanks for asking. This issue is not ready for development. In fact, none of the markdown linting issues that are ready for development. See https://github.com/magento/devdocs/wiki/Markdown-linting-issues for more information. |
There are still MD046 errors that we cannot fix. The mdl tool identifies code blocks inside nested lists as errors. For example:
We can fix these "errors" by removing the line between the bullet and the code block, but that makes the source less readable. Since our goal with enabling linting rules is to promote the readability of source markdown, that's not a viable option. For now, we should merge the fixes for legitimate errors and report this issue to the mdl maintainers. Until it's fixed however, we won't be enabling this rule on production. |
No need to report this to the maintainers. It appears that it's already been reported and a PR is in place to fix it: markdownlint/markdownlint#293. It's been open since Jan 11. |
Looks like the fix just got merged, which is great! Now the question becomes, will we be able to use it when they bump the package version with this fix? For example, I don't think we can currently use the latest release ( Cc: @dshevtsov |
It still fails on |
It doesn't fail in the merchdocs project by the way: https://github.com/magento/merchdocs/blob/master/Gemfile#L11 |
Should this be moved out of Dev in Progress @dshevtsov @jeff-matthews ? What's the status on this? |
As far as I know, we're still stuck on version .7 of the MDL tool, but it is not currently in progress. I'll move it. |
Bug report
Description
The Markdown linter reports about 704 issues when the rule 'MD046' is enabled.
Steps to reproduce
_checks/styles/style-rules-prod
changeexclude_rule 'MD046'
torule 'MD046', :style => :fenced
.rake test:md
.Test your updates
rake:preview
). For more information, refer to the README.Note-->Do NOT use special keywords in your commit message.
Expected result
All the reported issues are fixed.
The
rake test:md
command returnsNo issues found
.The text was updated successfully, but these errors were encountered: