diff --git a/lib/bemxjst/index.js b/lib/bemxjst/index.js index 199eb145..a1593252 100644 --- a/lib/bemxjst/index.js +++ b/lib/bemxjst/index.js @@ -369,7 +369,7 @@ BEMXJST.prototype.renderContent = function renderContent(content, isBEM) { context._notNewList = false; if (isBEM) { - context.position = 1; + context.position = 0; context._listLength = 1; } diff --git a/test/bemcontext-position-test.js b/test/bemcontext-position-test.js index 7fb6b4de..53a1959f 100644 --- a/test/bemcontext-position-test.js +++ b/test/bemcontext-position-test.js @@ -4,75 +4,89 @@ var test = fixtures.test; describe('BEMContext this.position', function() { it('should have proper this.position', function() { test(function() { - block('b1').content()(function() { return this.position; }); + block('b').content()(function() { return this.position; }); }, [ - { block: 'b1' }, - { block: 'b1' }, - '', - { block: 'b1' }, - { - tag: 'div', - content: 'blah' - }, - { block: 'b1' } - ], '