silverbullet/packages/common/hack.ts

5 lines
254 B
TypeScript
Raw Normal View History

2022-10-08 21:46:56 +08:00
export function patchDenoLibJS(code: string): string {
// The Deno std lib has one occurence of a regex that Webkit JS doesn't (yet parse), we'll strip it because it's likely never invoked anyway, YOLO
return code.replaceAll("/(?<=\\n)/", "/()/");
}