From 54371690444d4fb23c14fe3169d9933ecd46ec3e Mon Sep 17 00:00:00 2001 From: Micha Pietsch Date: Mon, 14 Oct 2019 22:00:20 +0200 Subject: [PATCH] Correctly nest sub-menu for h3s inside h2 list item --- package.json | 2 +- themes/vue/source/js/common.js | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 030bfdfb41..184c8a9a94 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "vuejs.org", "private": true, "hexo": { - "version": "3.8.0" + "version": "3.8.1" }, "scripts": { "start": "hexo server", diff --git a/themes/vue/source/js/common.js b/themes/vue/source/js/common.js index 707b74a6e4..74428f007d 100644 --- a/themes/vue/source/js/common.js +++ b/themes/vue/source/js/common.js @@ -368,12 +368,13 @@ var headers = content.querySelectorAll('h2') if (headers.length) { each.call(headers, function (h) { - sectionContainer.appendChild(makeLink(h)) + var listItem = makeLink(h) + sectionContainer.appendChild(listItem) var h3s = collectH3s(h) allHeaders.push(h) allHeaders.push.apply(allHeaders, h3s) if (h3s.length) { - sectionContainer.appendChild(makeSubLinks(h3s, isAPIOrStyleGuide)) + listItem.appendChild(makeSubLinks(h3s, isAPIOrStyleGuide)) } }) } else {