Skip to content

Commit 76c9d0c

Browse files
committed
find js/javascript code blocks in addition to ts/typescript
1 parent 7245fe8 commit 76c9d0c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/util/codeBlocks.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { Message, TextChannel } from 'discord.js';
22
import { decompressFromEncodedURIComponent } from 'lz-string';
33
import { getReferencedMessage } from './getReferencedMessage';
44

5-
const CODEBLOCK_REGEX = /```(?:ts|typescript)?\n([\s\S]+)```/;
5+
const CODEBLOCK_REGEX = /```(?:ts|typescript|js|javascript)?\n([\s\S]+)```/;
66

77
export const PLAYGROUND_REGEX = /https?:\/\/(?:www\.)?(?:typescriptlang|staging-typescript)\.org\/(?:play|dev\/bug-workbench)(?:\/index\.html)?\/?(\??(?:\w+=[^\s#&]*)?(?:\&\w+=[^\s#&]*)*)#code\/([\w\-%+_]+={0,4})/;
88

0 commit comments

Comments
 (0)