mirror of
https://github.com/showdownjs/showdown.git
synced 2024-03-22 13:30:55 +08:00
Fixed #21 -- Github codeblocks can now contain back ticks
This commit is contained in:
parent
fa38885994
commit
f3f928084e
|
@ -905,7 +905,7 @@ var _DoGithubCodeBlocks = function(text) {
|
|||
// attacklab: sentinel workarounds for lack of \A and \Z, safari\khtml bug
|
||||
text += "~0";
|
||||
|
||||
text = text.replace(/(?:^|\n)```(.*)\n([^`]+)\n```/g,
|
||||
text = text.replace(/(?:^|\n)```(.*)\n([\s\S]*?)\n```/g,
|
||||
function(wholeMatch,m1,m2) {
|
||||
var language = m1;
|
||||
var codeblock = m2;
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<p>Define a function in javascript:</p>
|
||||
|
||||
<pre><code>function MyFunc(a) {
|
||||
// ...
|
||||
var s = '`';
|
||||
}
|
||||
</code></pre>
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ Define a function in javascript:
|
|||
|
||||
```
|
||||
function MyFunc(a) {
|
||||
// ...
|
||||
var s = '`';
|
||||
}
|
||||
```
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user