We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 59ed619 commit 1f9394aCopy full SHA for 1f9394a
src/__tests__/rehype-static-to-dynamic.test.ts
@@ -66,17 +66,15 @@ function extractTransformedCode(tree: Root): string {
66
67
// Extract the code from the dynamic tab
68
const preElement = dynamicTab.children.find(
69
- (child): child is Element =>
70
- isElement(child) && child.tagName === 'pre'
+ (child): child is Element => isElement(child) && child.tagName === 'pre'
71
);
72
73
if (!preElement) {
74
throw new Error('Pre element not found in dynamic tab');
75
}
76
77
const codeElement = preElement.children.find(
78
79
- isElement(child) && child.tagName === 'code'
+ (child): child is Element => isElement(child) && child.tagName === 'code'
80
81
82
if (!codeElement) {
0 commit comments