diff options
Diffstat (limited to 'guidelines/wikipedia/src/pseudoHeadings.js')
-rw-r--r-- | guidelines/wikipedia/src/pseudoHeadings.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/guidelines/wikipedia/src/pseudoHeadings.js b/guidelines/wikipedia/src/pseudoHeadings.js index bbf7d8d..1776b6e 100644 --- a/guidelines/wikipedia/src/pseudoHeadings.js +++ b/guidelines/wikipedia/src/pseudoHeadings.js @@ -3,8 +3,11 @@ exports.description = "Do not make pseudo-headings using bold or semicolon marku 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); + var boldText = $.trim($(b).text()); + var paraText = $.trim($(b).closest('p').text()); + if (boldText && boldText === paraText) { + report.error('Bold text used as pseudo-heading: '+ boldText, b); + } }); $5('#mw-content-text dl:not(:has(dd)) dt').each(function(i, dt) { |