[GH-ISSUE #46] escape backtick violates MD038 #1885

Closed
opened 2026-03-07 20:02:26 +03:00 by kerem · 2 comments
Owner

Originally created by @unional on GitHub (Feb 12, 2017).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/46

Writing ` is marked as violating MD038 no-space-in-code

`` ` ``
Originally created by @unional on GitHub (Feb 12, 2017). Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/46 Writing `` ` `` is marked as violating MD038 `no-space-in-code` ```markdown `` ` `` ```
kerem 2026-03-07 20:02:26 +03:00
Author
Owner

@DavidAnson commented on GitHub (Feb 13, 2017):

Per http://spec.commonmark.org/0.27/#code-spans your example is parsed as:

  1. token: begin-inline-code
  2. text: space backtick space
  3. token: end-inline-code

At this point, MD038 is correct in reporting a violation.

However, the spec also says that leading/trailing whitespace is to be removed from the inline - at which point MD038 is wrong to report a violation.

I think this is what you're reporting?

<!-- gh-comment-id:279295022 --> @DavidAnson commented on GitHub (Feb 13, 2017): Per http://spec.commonmark.org/0.27/#code-spans your example is parsed as: 1. token: begin-inline-code 2. text: space backtick space 3. token: end-inline-code At this point, `MD038` is correct in reporting a violation. However, the spec also says that leading/trailing whitespace is to be removed from the inline - at which point `MD038` is wrong to report a violation. I think this is what you're reporting?
Author
Owner

@unional commented on GitHub (Feb 13, 2017):

I think so. The use case is to render backtick in the inline code block.

<!-- gh-comment-id:279295528 --> @unional commented on GitHub (Feb 13, 2017): I think so. The use case is to render backtick in the inline code block.
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#1885
No description provided.