diff --git a/README.md b/README.md index 1566292..e3fbb7d 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ by github or bitbucket via a command line flag. -**Table of Contents** *generated with [DocToc](http://doctoc.herokuapp.com/)* +**Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)* - [Installation](#installation) - [Usage](#usage) diff --git a/lib/transform.js b/lib/transform.js index ae8892a..50131bf 100644 --- a/lib/transform.js +++ b/lib/transform.js @@ -137,7 +137,7 @@ exports = module.exports = function transform(content, mode, maxHeaderNo) { if (linkedHeaders.length === 0) return { transformed: false }; var toc = - '**Table of Contents** *generated with [DocToc](http://doctoc.herokuapp.com/)*' + '**Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)*' + '\n\n' + linkedHeaders .map(function (x) { diff --git a/test/transform-html.js b/test/transform-html.js index a912850..00664da 100644 --- a/test/transform-html.js +++ b/test/transform-html.js @@ -10,7 +10,7 @@ test('\ngiven a file that includes html with header tags and maxHeaderNo 8', fun t.deepEqual( headers.toc.split('\n') - , [ '**Table of Contents** *generated with [DocToc](http://doctoc.herokuapp.com/)*', + , [ '**Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)*', '', '- [Installation](#installation)', '- [API](#api)', @@ -35,7 +35,7 @@ test('\ngiven a file that includes html with header tags using default maxHeader t.deepEqual( headers.toc.split('\n') - , [ '**Table of Contents** *generated with [DocToc](http://doctoc.herokuapp.com/)*', + , [ '**Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)*', '', '- [Installation](#installation)', '- [API](#api)', diff --git a/test/transform.js b/test/transform.js index 16224ec..2963922 100644 --- a/test/transform.js +++ b/test/transform.js @@ -44,7 +44,7 @@ check( , '#### Main Usage' , 'some main usage here' ].join('\n') - , [ '**Table of Contents** *generated with [DocToc](http://doctoc.herokuapp.com/)*\n\n' + , [ '**Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n' , '- [My Module](#my-module)\n' , ' - [API](#api)\n' , ' - [Method One](#method-one)\n' @@ -63,7 +63,7 @@ check( , '#### Main Usage' , 'some main usage here' ].join('\r\n') - , [ '**Table of Contents** *generated with [DocToc](http://doctoc.herokuapp.com/)*\n\n' + , [ '**Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n' , '- [My Module using \\r\\n line endings](#my-module-using-\\r\\n-line-endings)\n' , ' - [API](#api)\n' , ' - [Method One](#method-one)\n' @@ -79,7 +79,7 @@ check( , 'API' , '---------' ].join('\n') - , [ '**Table of Contents** *generated with [DocToc](http://doctoc.herokuapp.com/)*\n\n' + , [ '**Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n' , '- [My Module](#my-module)\n' , ' - [API](#api)\n\n\n' ].join('') @@ -90,7 +90,7 @@ check( , 'Some text here' , '## API ##' ].join('\n') - , [ '**Table of Contents** *generated with [DocToc](http://doctoc.herokuapp.com/)*\n\n' + , [ '**Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n' , '- [My Module](#my-module)\n' , ' - [API](#api)\n\n\n' ].join('') @@ -108,7 +108,7 @@ check( , '' , '## Title should also be included' ].join('\n') - , [ '**Table of Contents** *generated with [DocToc](http://doctoc.herokuapp.com/)*\n\n' + , [ '**Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n' , '- [Title should be included](#title-should-be-included)\n' , '- [Title should also be included](#title-should-also-be-included)\n\n\n' ].join('') @@ -119,7 +119,7 @@ check( , '' , '# Repeating A Title' ].join('\n') - , [ '**Table of Contents** *generated with [DocToc](http://doctoc.herokuapp.com/)*\n\n' + , [ '**Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n' , '- [Repeating A Title](#repeating-a-title)\n' , '- [Repeating A Title](#repeating-a-title-1)\n\n\n' ].join('') @@ -130,7 +130,7 @@ check( , 'some content' , '-- preceded by two dashes but has content, therefore "some content" should not be header' ].join('\n') - , [ '**Table of Contents** *generated with [DocToc](http://doctoc.herokuapp.com/)*\n\n', + , [ '**Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n', '- [Header](#header)\n\n\n', ].join('') ) @@ -141,7 +141,7 @@ check( , 'In the Right Order' , '==================' ].join('\n') - , [ '**Table of Contents** *generated with [DocToc](http://doctoc.herokuapp.com/)*\n\n' + , [ '**Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n' , '- [Different Kinds](#different-kinds)\n' , '- [In the Right Order](#in-the-right-order)\n\n\n' ].join('') @@ -153,7 +153,7 @@ check( , '' , '# In the Right Order 2' ].join('\n') - , [ '**Table of Contents** *generated with [DocToc](http://doctoc.herokuapp.com/)*\n\n' + , [ '**Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n' , '- [Different Kinds 2](#different-kinds-2)\n' , '- [In the Right Order 2](#in-the-right-order-2)\n\n\n' ].join('') @@ -167,7 +167,7 @@ test('transforming when old toc exists', function (t) { , '' , '' , '' - , '**Table of Contents** *generated with [DocToc](http://doctoc.herokuapp.com/)*' + , '**Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)*' , '' , '- [OldHeader](#oldheader)' , '' @@ -183,7 +183,7 @@ test('transforming when old toc exists', function (t) { t.deepEqual( res.toc.split('\n') - , [ '**Table of Contents** *generated with [DocToc](http://doctoc.herokuapp.com/)*', + , [ '**Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)*', '', '- [Header](#header)', '' ] @@ -194,7 +194,7 @@ test('transforming when old toc exists', function (t) { res.wrappedToc.split('\n') , [ '', '', - '**Table of Contents** *generated with [DocToc](http://doctoc.herokuapp.com/)*', + '**Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)*', '', '- [Header](#header)', '', @@ -211,7 +211,7 @@ test('transforming when old toc exists', function (t) { '', '', '', - '**Table of Contents** *generated with [DocToc](http://doctoc.herokuapp.com/)*', + '**Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)*', '', '- [Header](#header)', '', @@ -235,7 +235,7 @@ check( , '#### Main Usage' , 'some main usage here' ].join('\n') - , [ '**Table of Contents** *generated with [DocToc](http://doctoc.herokuapp.com/)*\n\n' + , [ '**Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n' , '- [My Module](#markdown-header-my-module)\n' , ' - [API](#markdown-header-api)\n' , ' - [Method One](#markdown-header-method-one)\n'