Skip to content

armgit / E2B

Public Imported from GitHub
0

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

remove special characters from anchor link generator in prebuild

0div39691f4e4990
diff --git a/apps/web/prebuild.js b/apps/web/prebuild.js
index 459b9da47..12e7e6efe 100644
--- a/apps/web/prebuild.js
+++ b/apps/web/prebuild.js
@@ -42,6 +42,8 @@ function formatModuleTitle(title) {
}
function toAnchorLink(title) {
+ // Remove special characters except dashes and spaces
+ title = title.replace(/[^a-zA-Z0-9\- ]/g, '')
// Add dashes between words for camelCase
title = title.replace(/([a-z])([A-Z])/g, '$1-$2')
return '#' + title.toLowerCase().replace(/ /g, '-')