Fixed #21 -- Github codeblocks can now contain back ticks

This commit is contained in:
Titus 2012-06-14 00:09:58 -06:00
parent fa38885994
commit f3f928084e
3 changed files with 3 additions and 3 deletions

View File

@ -905,7 +905,7 @@ var _DoGithubCodeBlocks = function(text) {
// attacklab: sentinel workarounds for lack of \A and \Z, safari\khtml bug // attacklab: sentinel workarounds for lack of \A and \Z, safari\khtml bug
text += "~0"; text += "~0";
text = text.replace(/(?:^|\n)```(.*)\n([^`]+)\n```/g, text = text.replace(/(?:^|\n)```(.*)\n([\s\S]*?)\n```/g,
function(wholeMatch,m1,m2) { function(wholeMatch,m1,m2) {
var language = m1; var language = m1;
var codeblock = m2; var codeblock = m2;

View File

@ -3,7 +3,7 @@
<p>Define a function in javascript:</p> <p>Define a function in javascript:</p>
<pre><code>function MyFunc(a) { <pre><code>function MyFunc(a) {
// ... var s = '`';
} }
</code></pre> </code></pre>

View File

@ -3,7 +3,7 @@ Define a function in javascript:
``` ```
function MyFunc(a) { function MyFunc(a) {
// ... var s = '`';
} }
``` ```