diff --git a/lib/main/build-site.js b/lib/main/build-site.js index 88298db07..72ee89f84 100644 --- a/lib/main/build-site.js +++ b/lib/main/build-site.js @@ -28,11 +28,17 @@ function build(type) { .attr('class', null) .attr('id', null); - $(':header > a[href]').each(function() { + $(':header:not(h3) > a').each(function() { var $a = $(this); $a.replaceWith($a.html()); }); + // Fix marky-markdown wrapping of sibling anchors. + $('h3 ~ a').each(function() { + var $a = $(this); + $a.nextAll('p').first().append($a); + }); + // Append YAML front matter. var html = [ '---', diff --git a/package.json b/package.json index 438c2bb7c..a59fc7dd3 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "doc": "node lib/main/build-doc github && npm run test:doc", "doc:fp": "node lib/fp/build-doc", "doc:site": "node lib/main/build-doc site", - "doc:sitehtml": "optional-dev-dependency marky-markdown@^7.0.2 && npm run doc:site && node lib/main/build-site", + "doc:sitehtml": "optional-dev-dependency marky-markdown@^8.0.0 && npm run doc:site && node lib/main/build-site", "pretest": "npm run build", "style": "npm run style:main && npm run style:fp && npm run style:perf && npm run style:test", "style:fp": "jscs fp/*.js lib/**/*.js",