I’m trying to add support into showdown.js for code fencing, but I’m still sort of a noob at regex. Code fencing, if you don’t know, is like this:
```javascript
alert('hello world');
```
Then it’d create something like:
<div class="highlight">
<pre lang="javascript">
alert('hello world');
</pre>
</div>
How do I go about capturing “`(anything)\n(anything)“` in JavaScript flavored regex?
1 Answer