]> git.gir.st - VimFx.git/commit
Fix #334: Make links without `href` markable
authorSimon Lydell <simon.lydell@gmail.com>
Wed, 4 Jun 2014 17:43:56 +0000 (19:43 +0200)
committerSimon Lydell <simon.lydell@gmail.com>
Wed, 4 Jun 2014 17:43:56 +0000 (19:43 +0200)
commit9cd7f9da1ae06de3a218d546a8cf6b180fa95d9c
tree73a3532d6fd8707fb2db9e93bed09ef194b90719
parentf6cdc656ddb056ffa89f1073c30eaecd9cf3ee67
Fix #334: Make links without `href` markable

Commit be94b559b:

> - Only `<a>` elements with a `href` attribute should be matched, since
>   HTML5 allows `<a>` elements to omit `href`:
>
>   > If the a element has no href attribute, then the element represents
>   > a placeholder for where a link might otherwise have been placed, if
>   > it had been relevant, consisting of just the element's contents.
>
>   Reference:
>   <http://developers.whatwg.org/text-level-semantics.html#the-a-element>

That’s the spec. In the reality, people use all sorts of weird markup.
Some sites (such as StackExchange sites) leave out the `href` property
and use the anchor as a JavaScript-powered button (instead of just using
the `button` element).

This commit reverts the change to link matching in be94b559b. A side
effect is that sites using links without `href` in compliance with the
spec will get extranous markers for those links. It’s better to show too
many markers than too few, though.
extension/packages/utils.coffee
Imprint / Impressum