Skip to content

Commit

Permalink
Add support for specifying ':' after a language.
Browse files Browse the repository at this point in the history
Qiita style.
  • Loading branch information
diskshima committed Oct 28, 2014
1 parent 3e02a69 commit 8153dcd
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/marked.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ block.normal = merge({}, block);
*/

block.gfm = merge({}, block.normal, {
fences: /^ *(`{3,}|~{3,}) *(\S+)? *\n([\s\S]+?)\s*\1 *(?:\n+|$)/,
fences: /^ *(`{3,}|~{3,}) *([^\s:]+)?[ :]*\n([\s\S]+?)\s*\1 *(?:\n+|$)/,
paragraph: /^/
});

Expand Down
2 changes: 1 addition & 1 deletion test/new/gfm_code.text
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
``` js
``` js:
var a = 'hello';
console.log(a + ' world');
```
Expand Down
2 changes: 1 addition & 1 deletion test/tests/gfm_code.text
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
``` js
``` js:
var a = 'hello';
console.log(a + ' world');
```
Expand Down

0 comments on commit 8153dcd

Please sign in to comment.