Skip to content

Commit 423078e

Browse files
committed
fix naming
1 parent 3544689 commit 423078e

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "tocbot",
3-
"version": "1.0.5",
3+
"version": "1.0.6",
44
"description": "Generate a table of contents based on the heading structure of a html document.",
55
"main": "src/js/index.js",
66
"scripts": {

src/js/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@
102102
tocbot.destroy();
103103

104104
// Get headings array
105-
headingsArray = parseContent.selectHeadings(options.contentSelector, options.headingSelectors);
105+
headingsArray = parseContent.selectHeadings(options.contentSelector, options.headingSelector);
106106

107107
// Build nested headings array.
108108
var nestedHeadingsObj = parseContent.nestHeadingsArray(headingsArray);

src/templates/default.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ <h3 class="max-width--large anchor--middle line--tight skip-toc soft flush--top"
4242
<script src="js/smooth-scroll.js"></script>
4343
<script>
4444
tocbot.init({
45-
headingSelectors: 'h1, h2, h3, h4',
45+
headingSelector: 'h1, h2, h3, h4',
4646
smoothScroll: window.smoothScroll
4747
});
4848
</script>

test/test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ describe('Build HTML', function () {
4747

4848
it('should properly serialize the data', function () {
4949
var parse = tocbot._parseContent;
50-
var headings = parse.selectHeadings(tocbot.options.contentSelector, tocbot.options.headingSelectors);
50+
var headings = parse.selectHeadings(tocbot.options.contentSelector, tocbot.options.headingSelector);
5151
expect(headings.length).to.equal(20);
5252

5353
var nest = require('./test-data.js')();

0 commit comments

Comments
 (0)