Skip to content

Commit bd9ef5a

Browse files
michapietschphanan
authored andcommitted
Correctly nest sub-menu for h3s inside h2 list item (#2345)
1 parent 3cec00e commit bd9ef5a

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "vuejs.org",
33
"private": true,
44
"hexo": {
5-
"version": "3.8.0"
5+
"version": "3.8.1"
66
},
77
"scripts": {
88
"start": "hexo server",

themes/vue/source/js/common.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -368,12 +368,13 @@
368368
var headers = content.querySelectorAll('h2')
369369
if (headers.length) {
370370
each.call(headers, function (h) {
371-
sectionContainer.appendChild(makeLink(h))
371+
var listItem = makeLink(h)
372+
sectionContainer.appendChild(listItem)
372373
var h3s = collectH3s(h)
373374
allHeaders.push(h)
374375
allHeaders.push.apply(allHeaders, h3s)
375376
if (h3s.length) {
376-
sectionContainer.appendChild(makeSubLinks(h3s, isAPIOrStyleGuide))
377+
listItem.appendChild(makeSubLinks(h3s, isAPIOrStyleGuide))
377378
}
378379
})
379380
} else {

0 commit comments

Comments
 (0)