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

Handle codeblocks that are nested #293

Merged
merged 1 commit into from
Feb 19, 2020

Conversation

jaymzh
Copy link
Member

@jaymzh jaymzh commented Jan 11, 2020

If a codeblock is nested inside of either a list or another
code block, it will have preceeding spaces, even if it is fenced, so
ignore those spaces.

Updates the testing ruleset to always include MD046 so we can catch
more issues like this in the future and updates tests accordingly.

Also adds various tests for this.

Related Issues

Should close #217 #221 #233 I think.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation (non-breaking change that does not add functionality but updates documentation)
  • Chore (non-breaking change that does not add functionality or fix an issue)

Checklist:

  • I have read the CONTRIBUTING document.
  • Wrote good commit messages
  • Feature branch is up-to-date with master, if not - rebase it
  • Added tests for all new/changed functionality, including tests for positive and negative scenarios
  • The PR relates to only one subject with a clear title and description in grammatically correct, complete sentences

@jaymzh jaymzh requested a review from NaomiReeves January 11, 2020 16:00
lib/mdl/doc.rb Outdated Show resolved Hide resolved
@jaymzh jaymzh changed the title ## Handle codeblocks that are nested Handle codeblocks that are nested Jan 11, 2020
@jaymzh jaymzh force-pushed the codeblocks_in_things branch 2 times, most recently from 3637d0b to 45ff2db Compare January 11, 2020 19:09
If a codeblock is nested inside of either a list or another
code block, it will have preceeding spaces, even if it is fenced, so
ignore those spaces.

Updates the testing ruleset to always include MD046 so we can catch
more issues like this in the future and updates tests accordingly.

Also adds various tests for this.

This should close markdownlint#217 markdownlint#221 markdownlint#233.

Signed-off-by: Phil Dibowitz <phil@ipom.com>
@NaomiReeves NaomiReeves merged commit a43f119 into markdownlint:master Feb 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MD046 vs indented code blocks
2 participants