So, I have:
/`{3}(?:(.*$)\n)?([\s\S]*)`{3}/m
Which matches things like this fine:
```javascript
alert('Hello World');
//It wont break even if i throw in ``` in this comment!
```
But unfortunately it also matches:
```javascript
alert('Hello World');
```
```javascript
alert('OH NOES!');
```
As one match, but it should be two. It should look for everything, including other “` inside, but once it sees a double line break, it should start looking for another match.
Use the non-greedy
.*?instead of.*.