Skip to content

Commit 59f380b

Browse files
authored
Merge pull request #187 from mkantor/find-javascript-code-blocks
Find `js`/`javascript` code blocks in addition to `ts`/`typescript`
2 parents 7245fe8 + 76c9d0c commit 59f380b

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)