[GH-ISSUE #181] rule MD034 flags URL in Inline code with backticks as "bare url" #156

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

Originally created by @xueqing on GitHub (Apr 28, 2019).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/181

A URL inside of an inline code with backticks is marked as a "bare url" by markdownlint.
My editor is vscode.

Example:
git clone https://github.com/tensorflow/tensorflow.git

markdownlint-no-bare-urls

Originally created by @xueqing on GitHub (Apr 28, 2019). Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/181 A URL inside of an `inline code` with backticks is marked as a "bare url" by markdownlint. My editor is vscode. Example: `git clone https://github.com/tensorflow/tensorflow.git` ![markdownlint-no-bare-urls](https://user-images.githubusercontent.com/6188285/56857534-43397180-69a1-11e9-90cb-34aa6b8555ec.png)
kerem 2026-03-03 01:24:13 +03:00
Author
Owner

@DavidAnson commented on GitHub (Apr 28, 2019):

Thanks, I should be able to look at this soon.

<!-- gh-comment-id:487336014 --> @DavidAnson commented on GitHub (Apr 28, 2019): Thanks, I should be able to look at this soon.
Author
Owner

@nschonni commented on GitHub (Apr 29, 2019):

I think it's actually flagging the # use https://, but I've noticed that the cursor position can sometimes be off on rules in VS Code. EX: Unescaped (MD033) violations usually point to the first element on a line, even if the actual error is with a different element later on in the same line.

<!-- gh-comment-id:487433024 --> @nschonni commented on GitHub (Apr 29, 2019): I think it's actually flagging the `# use https://`, but I've noticed that the cursor position can sometimes be off on rules in VS Code. EX: Unescaped (MD033) violations usually point to the first element on a line, even if the actual error is with a different element later on in the same line.
Author
Owner

@xueqing commented on GitHub (Apr 29, 2019):

Thank you for your explanation! It works for me.

<!-- gh-comment-id:487435766 --> @xueqing commented on GitHub (Apr 29, 2019): Thank you for your explanation! It works for me.
Author
Owner

@xueqing commented on GitHub (Apr 29, 2019):

It seems it's my comment problem o(╥﹏╥)o
@DavidAnson

<!-- gh-comment-id:487436068 --> @xueqing commented on GitHub (Apr 29, 2019): It seems it's my comment problem o(╥﹏╥)o @DavidAnson
Author
Owner

@DavidAnson commented on GitHub (Apr 29, 2019):

That’s great to know, thank you both! I think the error and line number are correct, but the highlighting is wrong. I will leave this issue open to look into that.

Some background, in case you are interested: Some rules identify the range themselves and should usually be correct. There are some cases where the VS Code extension does its own range calculation and those are less reliable because they are based on regular expressions.

<!-- gh-comment-id:487442232 --> @DavidAnson commented on GitHub (Apr 29, 2019): That’s great to know, thank you both! I think the error and line number are correct, but the highlighting is wrong. I will leave this issue open to look into that. Some background, in case you are interested: Some rules identify the range themselves and should usually be correct. There are some cases where the VS Code extension does its own range calculation and those are less reliable because they are based on regular expressions.
Author
Owner

@DavidAnson commented on GitHub (Apr 29, 2019):

By the way, I am one failing a test case away from improving MD033 in an upcoming commit. It should handle a few more scenarios and highlight better very soon!

<!-- gh-comment-id:487442473 --> @DavidAnson commented on GitHub (Apr 29, 2019): By the way, I am one failing a test case away from improving MD033 in an upcoming commit. It should handle a few more scenarios and highlight better very soon!
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#156
No description provided.