Skip to content

Commit 1a04c2b

Browse files
committed
standardise regex
1 parent 9393daa commit 1a04c2b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

assets/js/editor/Editor.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ async function loadDTS(specifier: string): Promise<Lib[]> {
158158
if (!filePath.startsWith('node_modules')) {
159159
// Load every common typedef into the common module
160160
let content = await fetchFile(`${commonSpecifier}${filePath}`);
161-
if (!content.startsWith('<!DOCTYPE html>')) {
161+
if (!content.match(/<!doctype html>/i)) {
162162
content = content.replace(/\* +@(.+?)\*\//gs, '*/');
163163
results.push({
164164
content: `declare module '@openfn/language-common' { ${content} }`,

0 commit comments

Comments
 (0)