Simplify nested highlights selector.

This commit is contained in:
John-David Dalton
2016-09-06 08:04:38 -07:00
parent 5c688cc0b7
commit 54f5ac7b8d

View File

@@ -137,9 +137,9 @@ function tidyHighlights($) {
}); });
// Collapse nested highlights. // Collapse nested highlights.
_.each(['comment', 'string'], cls => { _.each(['comment', 'string'], cls => {
$parent.find(`[class~="${ cls }"] > [class~="${ cls }"]`).each(function() { $parent.find(`[class~="${ cls }"]`).each(function() {
const $parent = $(this).parent(); const $element = $(this);
$parent.text($parent.text()); $element.text($element.text());
}); });
}); });
// Collapse nested spans. // Collapse nested spans.