mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-09 02:17:50 +00:00
Remove toc links from site.
This commit is contained in:
@@ -16,13 +16,16 @@ function build(type) {
|
|||||||
.readFileSync(readmePath, 'utf8')
|
.readFileSync(readmePath, 'utf8')
|
||||||
.replace(/(<)!--\s*|\s*--(>)/g, '$1$2');
|
.replace(/(<)!--\s*|\s*--(>)/g, '$1$2');
|
||||||
|
|
||||||
var $ = marky(markdown),
|
var $ = marky(markdown, { 'sanitize': false }),
|
||||||
$header = $('h1').first().remove(),
|
$header = $('h1').first().remove(),
|
||||||
version = _.trim($header.find('span').first().text()).slice(1);
|
version = _.trim($header.find('span').first().text()).slice(1);
|
||||||
|
|
||||||
// Remove docdown horizontal rules.
|
// Remove docdown horizontal rules.
|
||||||
$('hr').remove();
|
$('hr').remove();
|
||||||
|
|
||||||
|
// Remove table of contents (toc) links.
|
||||||
|
$('a[href="#docs"]').remove();
|
||||||
|
|
||||||
// Remove marky-markdown additions.
|
// Remove marky-markdown additions.
|
||||||
$('[id^="user-content-"]')
|
$('[id^="user-content-"]')
|
||||||
.attr('class', null)
|
.attr('class', null)
|
||||||
|
|||||||
Reference in New Issue
Block a user