[GH-ISSUE #236] Rule MD034 flags links inside divs as bare URLs #204

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

Originally created by @gwern on GitHub (Nov 21, 2019).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/236

$ mdl --version
0.8.0
 $ cat foo.page
<div>
[link](http://www.example.com)
$ mdl foo.page 
foo.page:2: MD034 Bare URL used

A detailed description of the rules is available at https://github.com/markdownlint/markdownlint/blob/master/docs/RULES.md

It appears any link inside a div causes the warning to fire, although as far as I can see, this is not a 'bare URL' in any sense relevant in the MD034 doc.

This is a simplified version of a feature I use for a number of things, like for epigraphs, for example:

<div class="epigraph">
> <q>"Beware of bugs in the above code; I have only proved it correct, not tried it."</q>
>
> [Donald Knuth](http://www-cs-faculty.stanford.edu/~uno/faq.html)
</div>
Originally created by @gwern on GitHub (Nov 21, 2019). Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/236 ``` $ mdl --version 0.8.0 $ cat foo.page <div> [link](http://www.example.com) $ mdl foo.page foo.page:2: MD034 Bare URL used A detailed description of the rules is available at https://github.com/markdownlint/markdownlint/blob/master/docs/RULES.md ``` It appears any link inside a div causes the warning to fire, although as far as I can see, this is not a 'bare URL' in any sense relevant in the [MD034 doc](https://github.com/markdownlint/markdownlint/blob/master/docs/RULES.md#md034---bare-url-used). This is a simplified version of a feature I use for a number of things, like for epigraphs, for example: ``` <div class="epigraph"> > <q>"Beware of bugs in the above code; I have only proved it correct, not tried it."</q> > > [Donald Knuth](http://www-cs-faculty.stanford.edu/~uno/faq.html) </div> ```
kerem 2026-03-03 01:24:39 +03:00
  • closed this issue
  • added the
    question
    label
Author
Owner

@DavidAnson commented on GitHub (Nov 21, 2019):

I can’t try the CLI right now, but I’m not seeing your issue here: https://dlaa.me/markdownlint/#%25m%23%20Issue%20236%0A%0A%3Cdiv%3E%0A%5Blink%5D(http%3A%2F%2Fwww.example.com)%0A

Can you reproduce it there?

<!-- gh-comment-id:556800591 --> @DavidAnson commented on GitHub (Nov 21, 2019): I can’t try the CLI right now, but I’m not seeing your issue here: https://dlaa.me/markdownlint/#%25m%23%20Issue%20236%0A%0A%3Cdiv%3E%0A%5Blink%5D(http%3A%2F%2Fwww.example.com)%0A Can you reproduce it there?
Author
Owner

@DavidAnson commented on GitHub (Nov 21, 2019):

Are you using the Ruby implementation? The latest markdownlint-cli version is 0.19.0: https://github.com/igorshubovych/markdownlint-cli/releases

<!-- gh-comment-id:556808343 --> @DavidAnson commented on GitHub (Nov 21, 2019): Are you using the Ruby implementation? The latest `markdownlint-cli` version is 0.19.0: https://github.com/igorshubovych/markdownlint-cli/releases
Author
Owner

@gwern commented on GitHub (Nov 21, 2019):

Oh, yes. I installed via gem install --user-install mdl. I thought I was in the right repo because I was consulting the doc for MD034; didn't occur to me that the docs for one tool might be in the repo for the other tool. It looks like it may already have been reported there as https://github.com/markdownlint/markdownlint/issues/191

<!-- gh-comment-id:556816694 --> @gwern commented on GitHub (Nov 21, 2019): Oh, yes. I installed via `gem install --user-install mdl`. I thought I was in the right repo because I was consulting the doc for MD034; didn't occur to me that the docs for one tool might be in the repo for the other tool. It looks like it may already have been reported there as https://github.com/markdownlint/markdownlint/issues/191
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#204
No description provided.