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/paragraphLength.js | |
parent | 0a47eab285bf1c04f48a2d6d84838a98807c8c69 (diff) |
Moves rule files to src/
Diffstat (limited to 'guidelines/wikipedia/paragraphLength.js')
-rw-r--r-- | guidelines/wikipedia/paragraphLength.js | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/guidelines/wikipedia/paragraphLength.js b/guidelines/wikipedia/paragraphLength.js deleted file mode 100644 index ba20306..0000000 --- a/guidelines/wikipedia/paragraphLength.js +++ /dev/null @@ -1,15 +0,0 @@ -exports.name = "Avoid single-sentence paragraphs"; -exports.description = "The number of single-sentence paragraphs should be minimized."; - -exports.rule = function(report) { - var sentenceBoundary = /[.?!](?:(?:\[\d+\])|['"])*(?:\s|$)/gm; - - $5('#mw-content-text p').each(function(i, p) { - var $p = $(p); - var text = $.trim($p.text()); - var boundaries = text && text.match(sentenceBoundary); - if (boundaries && boundaries.length === 1) { - report.warning('Paragraph with only one sentence: "' + text +'"', p); - } - }); -}; |