diff options
author | Jesse Hallett <jesse@galois.com> | 2014-01-06 16:43:33 -0800 |
---|---|---|
committer | Jesse Hallett <jesse@galois.com> | 2014-01-06 16:43:33 -0800 |
commit | 38a352620d98efca076e42828e48ca2617d7ea6d (patch) | |
tree | fa26daebc2367689a67f008aef182cbe1d48ce9d /guidelines/wikipedia/src/spaceBetweenParagraphs.js | |
parent | 800b351ff47165b041d8be5b2a4d9944579ab337 (diff) |
Adjusts spaceBetweenParagraphs rule
The rule should not consider two paragraphs to be related if there are
non-paragraph sibling elements separating them.
Diffstat (limited to 'guidelines/wikipedia/src/spaceBetweenParagraphs.js')
-rw-r--r-- | guidelines/wikipedia/src/spaceBetweenParagraphs.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/guidelines/wikipedia/src/spaceBetweenParagraphs.js b/guidelines/wikipedia/src/spaceBetweenParagraphs.js index ccab3a4..ccd3990 100644 --- a/guidelines/wikipedia/src/spaceBetweenParagraphs.js +++ b/guidelines/wikipedia/src/spaceBetweenParagraphs.js @@ -7,7 +7,7 @@ exports.rule = function(report) { $5('p:has(> br)').each(function(i, p) { var $p = $(p), prevP; if ($.trim($p.text()).length === 0) { - prevP = $p.prevAll('p').filter(function(i, pp) { + prevP = $p.prevUntil(':not(p)').filter(function(i, pp) { return $.trim($(pp).text()).length > 0; }).first(); |