We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 282d9c6 commit 40a9c43Copy full SHA for 40a9c43
src/routes/[pid=pid]/[org]/[repo]/[id=number]/syntax-highlighting.ts
@@ -17,7 +17,7 @@ export function detectLanguage(code: string): (SpecialLanguage | (string & {}))
17
if (match) return match[1];
18
19
const hasHTML = /<\/[a-zA-Z0-9-]+>/.test(code);
20
- const hasJS = / (let|var|const|=) /.test(code);
+ const hasJS = / (let|var|const|=|\/\/) /.test(code);
21
22
if (hasHTML && hasJS) return "svelte";
23
if (hasHTML) return "html";
0 commit comments