mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-12 11:57: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');
|
readmePath = path.join(docPath, 'README.md');
|
||||||
|
|
||||||
function build(type) {
|
function build(type) {
|
||||||
var html = marky(fs.readFileSync(readmePath, 'utf8'), { 'sanitize': false }),
|
var $ = marky(fs.readFileSync(readmePath, 'utf8'), { 'sanitize': false }),
|
||||||
header = html('h1').first(),
|
$header = $('h1').first().remove(),
|
||||||
version = _.trim(header.find('span').first().text());
|
version = _.trim($header.find('span').first().text());
|
||||||
|
|
||||||
header.remove();
|
$('h4').each(function() {
|
||||||
html = html.html().replace(/(<)!--\s*|\s*--(>)/g, '$1$2');
|
$(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 = [
|
html = [
|
||||||
'---',
|
'---',
|
||||||
|
|||||||
Reference in New Issue
Block a user