diff --git a/src/bootlint.js b/src/bootlint.js index 40021bd8..06c9196b 100644 --- a/src/bootlint.js +++ b/src/bootlint.js @@ -409,7 +409,7 @@ var LocationIndex = _location.LocationIndex; } }); addLinter("E004", function lintNestedContainers($, reporter) { - var nestedContainers = $('.container, .container-fluid').children('.container, .container-fluid'); + var nestedContainers = $('.container, .container-fluid').not(':has(.navbar)').find('.container, .container-fluid'); if (nestedContainers.length) { reporter("Containers (`.container` and `.container-fluid`) are not nestable", nestedContainers); } diff --git a/test/fixtures/containers/nested-fixed-fluid.html b/test/fixtures/containers/nested-fixed-fluid.html index 9e8acd19..2e59a8e9 100644 --- a/test/fixtures/containers/nested-fixed-fluid.html +++ b/test/fixtures/containers/nested-fixed-fluid.html @@ -21,6 +21,12 @@
+