Skip to content

armgit / E2B

Public Imported from GitHub
0

Open-source, secure environment with real-world tools for enterprise-grade agents.

convert h5 to h3 for js-sdk markdown and remove redundant constructor line

0divd4020d922dcc
diff --git a/packages/js-sdk/scripts/CustomMarkdownTheme.js b/packages/js-sdk/scripts/CustomMarkdownTheme.js
index ad1eb4db2..db55c01de 100644
--- a/packages/js-sdk/scripts/CustomMarkdownTheme.js
+++ b/packages/js-sdk/scripts/CustomMarkdownTheme.js
@@ -45,8 +45,15 @@ function removeLinesWithConditions(text) {
i += 3 // Skip this line and the next three
continue
}
+
+ if (lines[i].startsWith('##### new')) {
+ // avoid promoting constructors
+ i += 1
+ continue
+ }
+
// If not removed, add the line to filteredLines
- filteredLines.push(lines[i])
+ filteredLines.push(convertH5toH3(lines[i]))
}
// Join the filtered lines back into a single string