[GH-ISSUE #258] MD036 gets confused by parenthesis #221

Closed
opened 2026-03-03 01:24:50 +03:00 by kerem · 1 comment
Owner

Originally created by @Arcitec on GitHub (Feb 18, 2020).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/258

Try this document:

# Example

## Example 1

Paragraph 1.

Paragraph 2.

Paragraph 3.

_(Note: Here is a side note which will get flagged by rule MD036.)_

## Example 2

Nothing...

I decided to avoid using parenthesis, since that fixes the linting problem. But it's still weird that it gives such an incorrect linting result in the parenthesis case. :-)

Originally created by @Arcitec on GitHub (Feb 18, 2020). Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/258 Try this document: ```markdown # Example ## Example 1 Paragraph 1. Paragraph 2. Paragraph 3. _(Note: Here is a side note which will get flagged by rule MD036.)_ ## Example 2 Nothing... ``` I decided to avoid using parenthesis, since that fixes the linting problem. But it's still weird that it gives such an incorrect linting result in the parenthesis case. :-)
kerem 2026-03-03 01:24:50 +03:00
  • closed this issue
  • added the
    question
    label
Author
Owner

@DavidAnson commented on GitHub (Feb 19, 2020):

I don’t think there is an issue here. The relevant part of the rule description:

Note: This rule looks for single line paragraphs that consist entirely of emphasized text. It won't fire on emphasis used within regular text, multi-line emphasized paragraphs, or paragraphs ending in punctuation (normal or full-width).

MD036 fires in your example above because the conditions above are met. MD036 does not fire when the parenthesis are removed because then the paragraph ends in a punctuation character (‘.’).

More: https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md036---emphasis-used-instead-of-a-heading

<!-- gh-comment-id:588027501 --> @DavidAnson commented on GitHub (Feb 19, 2020): I don’t think there is an issue here. The relevant part of the rule description: > Note: This rule looks for single line paragraphs that consist entirely of emphasized text. It won't fire on emphasis used within regular text, multi-line emphasized paragraphs, or paragraphs ending in punctuation (normal or full-width). MD036 fires in your example above because the conditions above are met. MD036 does not fire when the parenthesis are removed because then the paragraph ends in a punctuation character (‘.’). More: https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md036---emphasis-used-instead-of-a-heading
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#221
No description provided.