mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-01-29 06:27:49 +00:00
Remove markymark links from h4s.
This commit is contained in:
@@ -11,12 +11,21 @@ var basePath = path.join(__dirname, '..', '..'),
|
||||
readmePath = path.join(docPath, 'README.md');
|
||||
|
||||
function build(type) {
|
||||
var html = marky(fs.readFileSync(readmePath, 'utf8'), { 'sanitize': false }),
|
||||
header = html('h1').first(),
|
||||
version = _.trim(header.find('span').first().text());
|
||||
var $ = marky(fs.readFileSync(readmePath, 'utf8'), { 'sanitize': false }),
|
||||
$header = $('h1').first().remove(),
|
||||
version = _.trim($header.find('span').first().text());
|
||||
|
||||
header.remove();
|
||||
html = html.html().replace(/(<)!--\s*|\s*--(>)/g, '$1$2');
|
||||
$('h4').each(function() {
|
||||
$(this)
|
||||
.attr('class', null)
|
||||
.attr('id', null)
|
||||
.find('a').each(function() {
|
||||
var $this = $(this);
|
||||
$this.replaceWith($this.text());
|
||||
});
|
||||
});
|
||||
|
||||
var html = $.html().replace(/(<)!--\s*|\s*--(>)/g, '$1$2');
|
||||
|
||||
html = [
|
||||
'---',
|
||||
|
||||
Reference in New Issue
Block a user