Skip to content

Commit c4d10b0

Browse files
committed
format source
1 parent cb2cc84 commit c4d10b0

File tree

2 files changed

+8
-13
lines changed

2 files changed

+8
-13
lines changed

gulp.d/tasks/build-preview-pages.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,7 @@ module.exports = (src, previewSrc, previewDest, sink = () => map()) => (done) =>
110110
doc
111111
.convert()
112112
// NOTE emulates the behavior of the view source url extension
113-
.replace(
114-
/<pre([^>]*)(><code[^>]*)?>\[data-source-url=(.+?)\]\n/g,
115-
'<pre$1$2 data-source-url="$3">'
116-
)
113+
.replace(/<pre([^>]*)(><code[^>]*)?>\[data-source-url=(.+?)\]\n/g, '<pre$1$2 data-source-url="$3">')
117114
)
118115
}
119116
file.extname = '.html'

src/js/05-tabset.js

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,11 @@ find('.doc .tabset').forEach(function (tabset) {
1414
checkActiveClass = setTimeout(function () {
1515
var activeTabList = tab.classList.contains('is-active')
1616
if (activeTabList) {
17-
document
18-
.querySelector('.tabs')
19-
.insertAdjacentHTML(
20-
'beforeend',
21-
/*eslint max-len: ["error", { "code": 180 }]*/
22-
'<div class="other-tab-box"><a href="#" class="dropddown-btn dropdown-btn-down">More... </a> <ul class="other-tablist" id="otherTabList"></ul></div>'
23-
)
17+
document.querySelector('.tabs').insertAdjacentHTML(
18+
'beforeend',
19+
/*eslint max-len: ["error", { "code": 180 }]*/
20+
'<div class="other-tab-box"><a href="#" class="dropddown-btn dropdown-btn-down">More... </a> <ul class="other-tablist" id="otherTabList"></ul></div>'
21+
)
2422
var dropdownBtn = document.querySelector('.dropdown-btn-down')
2523
var dropdownMenu = document.querySelector('.tabs .other-tablist')
2624
dropdownBtn.addEventListener('click', function (e) {
@@ -36,11 +34,11 @@ find('.doc .tabset').forEach(function (tabset) {
3634
}
3735
}, 100)
3836
if (window.innerWidth < smallBreak) {
39-
if (idx > (tabOnSmallScreen - 1)) {
37+
if (idx > tabOnSmallScreen - 1) {
4038
queueData.push(tab)
4139
}
4240
} else {
43-
if (idx > (tabOnLargeScreen - 1)) {
41+
if (idx > tabOnLargeScreen - 1) {
4442
queueData.push(tab)
4543
}
4644
}

0 commit comments

Comments
 (0)