Skip to content

Commit d803139

Browse files
committed
feat: update crawler
1 parent bb00905 commit d803139

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

packages/crawler/src/common.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@ turndownService.addRule('in-this-chapter', {
2929
filter: (node) => {
3030
return (
3131
node.nodeName === 'DIV' &&
32-
node.className.includes('in-this-chapter_wrapper')
32+
// in-this-chapter-module__p7uO0q__wrapper
33+
node.className.includes('in-this-chapter-module') &&
34+
node.className.includes('__wrapper')
3335
);
3436
},
3537
replacement: (content, node, options) => {
@@ -73,7 +75,7 @@ export function modifyCodeBlocks(main: Element) {
7375

7476
for (const codeBlock of codeBlocks) {
7577
const fileNameNode = codeBlock.querySelector(
76-
'[class^="code-block_filename"',
78+
'[class*="code-block-module"][class*="__filenameP"]',
7779
);
7880
const fileName = fileNameNode?.textContent || '';
7981

0 commit comments

Comments
 (0)