aboutsummaryrefslogtreecommitdiff
path: root/guidelines/wikipedia/pseudoHeadings.js
diff options
context:
space:
mode:
authorGravatar Rogan Creswick <creswick@gmail.com>2013-12-19 13:31:29 -0800
committerGravatar Rogan Creswick <creswick@gmail.com>2013-12-19 13:31:29 -0800
commitaa2a7b34b64be8daf1a9d50f589563275284d50e (patch)
treeda898aabcbca0191a57140e635e167b88aaa84e0 /guidelines/wikipedia/pseudoHeadings.js
parent3b53cef842cf0288ad55fe55ae2f578f75b40ae7 (diff)
parent15a644f91a8b6e80bbd24a824b91c24547b80035 (diff)
merge
Diffstat (limited to 'guidelines/wikipedia/pseudoHeadings.js')
-rw-r--r--guidelines/wikipedia/pseudoHeadings.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/guidelines/wikipedia/pseudoHeadings.js b/guidelines/wikipedia/pseudoHeadings.js
new file mode 100644
index 0000000..bbf7d8d
--- /dev/null
+++ b/guidelines/wikipedia/pseudoHeadings.js
@@ -0,0 +1,14 @@
+exports.name = "Do not make pseudo-headings";
+exports.description = "Do not make pseudo-headings using bold or semicolon markup.";
+
+exports.rule = function(report) {
+ $5('#mw-content-text p > b:only-child').each(function(i, b) {
+ var text = $.trim($(b).text());
+ report.error('Bold text used as pseudo-heading: '+ text, b);
+ });
+
+ $5('#mw-content-text dl:not(:has(dd)) dt').each(function(i, dt) {
+ var text = $.trim($(dt).text());
+ report.error('Semicolon markup used to create pseudo-heading: '+ text, dt);
+ });
+};