diff options
author | Jesse Hallett <jesse@galois.com> | 2014-01-06 10:50:22 -0800 |
---|---|---|
committer | Jesse Hallett <jesse@galois.com> | 2014-01-06 11:15:49 -0800 |
commit | 55cd32bfaf9ed5bc5418751369e46fa1d7f098e8 (patch) | |
tree | c5759cf75241a4e6bc0fb31596b69c59a9bdc6b5 /guidelines/wikipedia/spaceBetweenParagraphs.js | |
parent | 0a47eab285bf1c04f48a2d6d84838a98807c8c69 (diff) |
Moves rule files to src/
Diffstat (limited to 'guidelines/wikipedia/spaceBetweenParagraphs.js')
-rw-r--r-- | guidelines/wikipedia/spaceBetweenParagraphs.js | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/guidelines/wikipedia/spaceBetweenParagraphs.js b/guidelines/wikipedia/spaceBetweenParagraphs.js deleted file mode 100644 index ccab3a4..0000000 --- a/guidelines/wikipedia/spaceBetweenParagraphs.js +++ /dev/null @@ -1,28 +0,0 @@ -exports.name = "There should only be one blank line between paragraphs"; -exports.description = "Between sections - as between sections - there should be only a single blank line."; - -exports.rule = function(report) { - var problemPs = []; - - $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) { - return $.trim($(pp).text()).length > 0; - }).first(); - - if (prevP.length) { - problemPs.push(prevP.get(0)); - } - else { - report.error('Paragraph contains line breaks but does not contain text.', p); - } - } - }); - - _.uniq(problemPs, false).forEach(function(p) { - var text = $.trim($(p).text()); - report.error('Paragraph is followed by more than one blank line: '+ text, p); - }); -}; - |