]> git.gir.st - VimFx.git/commit
Fix #280: Use `[rel]` for prev/next link matching
authorSimon Lydell <simon.lydell@gmail.com>
Fri, 16 May 2014 18:26:16 +0000 (20:26 +0200)
committerSimon Lydell <simon.lydell@gmail.com>
Fri, 16 May 2014 18:26:16 +0000 (20:26 +0200)
commit52974ef625919ada8af6714618947f912df11abc
treed266ff73ec62b43a61cc4b8cc7c95c21a92c8887
parentb07a56a2c730605cd83fb1e371c5a70aa3323bf8
Fix #280: Use `[rel]` for prev/next link matching

The standard way of marking up the previous or next page of a series is
to use a `<link>` or `<a>` element with a `rel` attribute.

We don’t bother with `<link>`s since the commands are substitutes for
clicking a visible element. (And at least in my experience, they’re not
commonly used.) Moreover, if there’s a `<link>` with a `rel` attribute,
there’s likely a corresponding `<a>`, too.

We first try to find a nicely marked up link, then we fall back on
pattern matching of the text contents of the links.

The spec on the `rel` attribute:
<http://www.w3.org/TR/html5/links.html#linkTypes>

How Google handles it:
<https://support.google.com/webmasters/answer/1663744?hl=en>

This commit is based on #313 by @zhuochun.
extension/packages/commands.coffee
Imprint / Impressum