[GH-ISSUE #155] MD031 expecting blank lines inside code block #134

Closed
opened 2026-03-03 01:24:01 +03:00 by kerem · 5 comments
Owner

Originally created by @joaoportela on GitHub (Nov 19, 2018).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/155

I have a MD031 warning in a document but I have the expected blank lines around the code block, see:
image

If I put blank lines inside the code block the warning disappears. See:

image

Originally created by @joaoportela on GitHub (Nov 19, 2018). Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/155 I have a MD031 warning in a document but I have the expected blank lines around the code block, see: ![image](https://user-images.githubusercontent.com/217176/48730120-4598e200-ec31-11e8-9ad0-85cbc356e58b.png) If I put blank lines *inside* the code block the warning disappears. See: ![image](https://user-images.githubusercontent.com/217176/48730225-9c062080-ec31-11e8-9ad9-355e6b8e8fd3.png)
kerem 2026-03-03 01:24:01 +03:00
Author
Owner

@DavidAnson commented on GitHub (Nov 19, 2018):

Could it be confused by a previous fence that was not closed? Can you please point me at a document that reproduces this? I think the top part of the document will be relevant assuming you agree this is not normally a problem. Thanks!

<!-- gh-comment-id:440027161 --> @DavidAnson commented on GitHub (Nov 19, 2018): Could it be confused by a previous fence that was not closed? Can you please point me at a document that reproduces this? I think the top part of the document will be relevant assuming you agree this is not normally a problem. Thanks!
Author
Owner

@joaoportela commented on GitHub (Nov 22, 2018):

Could it be confused by a previous fence that was not closed?

What do you mean? An unmatched ```?

I can confirm that this is not normally a problem. I'll hunt for that file again.

<!-- gh-comment-id:441104539 --> @joaoportela commented on GitHub (Nov 22, 2018): > Could it be confused by a previous fence that was not closed? What do you mean? An unmatched ```? I can confirm that this is not normally a problem. I'll hunt for that file again.
Author
Owner

@joaoportela commented on GitHub (Nov 22, 2018):

I've found it.

The issue is caused by having this earlier in the file

image

Changing to this fixes it:

image

<!-- gh-comment-id:441104859 --> @joaoportela commented on GitHub (Nov 22, 2018): I've found it. The issue is caused by having this earlier in the file ![image](https://user-images.githubusercontent.com/217176/48919128-f351fe00-ee88-11e8-9aaf-0ebeb1656af6.png) Changing to this fixes it: ![image](https://user-images.githubusercontent.com/217176/48919146-0f559f80-ee89-11e8-9b40-86500744ca6c.png)
Author
Owner

@DavidAnson commented on GitHub (Nov 22, 2018):

Thank you, I’ll look at fixing this soon!

<!-- gh-comment-id:441112459 --> @DavidAnson commented on GitHub (Nov 22, 2018): Thank you, I’ll look at fixing this soon!
Author
Owner

@joaoportela commented on GitHub (Feb 5, 2019):

:)

<!-- gh-comment-id:460776485 --> @joaoportela commented on GitHub (Feb 5, 2019): :)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/markdownlint#134
No description provided.