diff --git a/index.js b/index.js index d31d469..6e75ce2 100644 --- a/index.js +++ b/index.js @@ -14,24 +14,10 @@ const defaults = {behavior: 'prepend', content: contentDefaults} const splice = [].splice -let deprecationWarningIssued = false - export default function attacher(options = {}) { let {linkProperties, behavior, content, group} = {...defaults, ...options} let method - // NOTE: Remove in next major version - if (options.behaviour !== undefined) { - if (!deprecationWarningIssued) { - deprecationWarningIssued = true - console.warn( - '[remark-autolink-headings] Deprecation Warning: `behaviour` is a nonstandard option. Use `behavior` instead.' - ) - } - - behavior = options.behaviour - } - if (behavior === 'wrap') { method = wrap } else if (behavior === 'before' || behavior === 'after') { diff --git a/test/index.js b/test/index.js index f540702..6993cd2 100644 --- a/test/index.js +++ b/test/index.js @@ -24,17 +24,6 @@ test('remarkAutolinkHeadings', (t) => { base('output.' + b + '.html'), 'should autolink headings (' + b + ')' ) - - t.is( - remark() - .use(remarkSlug) - .use(remarkHtml) - .use(remarkAutolinkHeadings, {behaviour: b}) - .processSync(base('input.md')) - .toString(), - base('output.' + b + '.html'), - 'should autolink headings with deprecated option (' + b + ')' - ) } t.is( @@ -98,7 +87,7 @@ test('remarkAutolinkHeadings', (t) => { tagName: 'div', properties: {className: ['heading-group']} }, - behaviour: 'before' + behavior: 'before' }) .processSync('# method') .toString(), @@ -117,7 +106,7 @@ test('remarkAutolinkHeadings', (t) => { properties: {className: ['heading-' + node.depth + '-group']} } }, - behaviour: 'after' + behavior: 'after' }) .processSync('# method') .toString(),