Skip to content

Commit f206ea2

Browse files
committed
Format build.js with prettier 3.4.2
1 parent 93a141e commit f206ea2

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

book/build.js

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ while (dirs.length) {
6767
const lang = langClass.replace('language-', '');
6868
const lines = node.html().split('\n');
6969
const boring = lines.map((line) =>
70-
line.includes('<span class="boring">')
70+
line.includes('<span class="boring">'),
7171
);
7272
const ellipsis = lines.map((line) => line.includes('// ...'));
7373
const target = entities.decode(node.text());
@@ -105,7 +105,11 @@ while (dirs.length) {
105105
foundScript = true;
106106
}
107107
});
108-
const pathsWithoutScript = ['build/toc.html', 'build/build/index.html', 'build/binding/index.html'];
108+
const pathsWithoutScript = [
109+
'build/toc.html',
110+
'build/build/index.html',
111+
'build/binding/index.html',
112+
];
109113
if (!foundScript && !pathsWithoutScript.includes(path)) {
110114
throw new Error('theme script not found');
111115
}
@@ -121,5 +125,8 @@ fs.copyFileSync('build/highlight.css', 'build/ayu-highlight.css');
121125
var bookjs = fs.readFileSync('build/book.js', 'utf8');
122126
bookjs = bookjs
123127
.replace('set_theme(theme, false);', '')
124-
.replace('document.querySelectorAll("code.hljs")', 'document.querySelectorAll("code.hidelines")');
128+
.replace(
129+
'document.querySelectorAll("code.hljs")',
130+
'document.querySelectorAll("code.hidelines")',
131+
);
125132
fs.writeFileSync('build/book.js', bookjs);

0 commit comments

Comments
 (0)