// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`toc remark plugin does not overwrite TOC var if no TOC 1`] = `
"foo

\`bar\`

\`\`\`js
baz
\`\`\`

export const toc = 1;
"
`;

exports[`toc remark plugin escapes inline code 1`] = `
"export const toc = [
	{
		value: '<code>&lt;Head /&gt;</code>',
		id: 'head-',
		level: 2
	},
	{
		value: '<code>&lt;Head&gt;Test&lt;/Head&gt;</code>',
		id: 'headtesthead',
		level: 3
	},
	{
		value: '<code>&lt;div /&gt;</code>',
		id: 'div-',
		level: 2
	},
	{
		value: '<code>&lt;div&gt; Test &lt;/div&gt;</code>',
		id: 'div-test-div',
		level: 2
	},
	{
		value: '<code>&lt;div&gt;&lt;i&gt;Test&lt;/i&gt;&lt;/div&gt;</code>',
		id: 'divitestidiv',
		level: 2
	},
	{
		value: '<code>&lt;div&gt;&lt;i&gt;Test&lt;/i&gt;&lt;/div&gt;</code>',
		id: 'divitestidiv-1',
		level: 2
	}
];

## \`<Head />\`

### \`<Head>Test</Head>\`

## \`<div />\`

## \`<div> Test </div>\`

## \`<div><i>Test</i></div>\`

## [\`<div><i>Test</i></div>\`](/some/link)
"
`;

exports[`toc remark plugin exports even with existing name 1`] = `
"export const toc = [
	{
		value: 'Thanos',
		id: 'thanos',
		level: 2
	},
	{
		value: 'Tony Stark',
		id: 'tony-stark',
		level: 2
	},
	{
		value: 'Avengers',
		id: 'avengers',
		level: 3
	}
];

## Thanos

## Tony Stark

### Avengers
"
`;

exports[`toc remark plugin handles empty headings 1`] = `
"export const toc = [];

# Ignore this

## 

## ![](an-image.svg)
"
`;

exports[`toc remark plugin inserts below imports 1`] = `
"import something from 'something';

import somethingElse from 'something-else';

export const toc = [
	{
		value: 'Title',
		id: 'title',
		level: 2
	},
	{
		value: 'Test',
		id: 'test',
		level: 2
	},
	{
		value: 'Again',
		id: 'again',
		level: 3
	}
];

## Title

## Test

### Again

Content.
"
`;

exports[`toc remark plugin outputs empty array for no TOC 1`] = `
"export const toc = [];

foo

\`bar\`

\`\`\`js
baz
\`\`\`
"
`;

exports[`toc remark plugin works on non text phrasing content 1`] = `
"export const toc = [
	{
		value: '<em>Emphasis</em>',
		id: 'emphasis',
		level: 2
	},
	{
		value: '<strong>Importance</strong>',
		id: 'importance',
		level: 3
	},
	{
		value: '<del>Strikethrough</del>',
		id: 'strikethrough',
		level: 2
	},
	{
		value: '<i>HTML</i>',
		id: 'html',
		level: 2
	},
	{
		value: '<code>inline.code()</code>',
		id: 'inlinecode',
		level: 2
	}
];

## _Emphasis_

### **Importance**

## ~~Strikethrough~~

## <i>HTML</i>

## \`inline.code()\`
"
`;

exports[`toc remark plugin works on text content 1`] = `
"export const toc = [
	{
		value: 'Endi',
		id: 'endi',
		level: 3
	},
	{
		value: 'Endi',
		id: 'endi-1',
		level: 2
	},
	{
		value: 'Yangshun',
		id: 'yangshun',
		level: 3
	},
	{
		value: 'I ♥ unicode.',
		id: 'i--unicode',
		level: 2
	}
];

### Endi

\`\`\`md
## This is ignored
\`\`\`

## Endi

Lorem ipsum

### Yangshun

Some content here

## I ♥ unicode.

export const c = 1;
"
`;
