Skip to content

Commit

Permalink
Merge remote-tracking branch 'ledsun/gfm_hashtag'
Browse files Browse the repository at this point in the history
  • Loading branch information
chjj committed May 8, 2015
2 parents 7dca210 + c3e3a89 commit 49b7eac
Show file tree
Hide file tree
Showing 9 changed files with 42 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/marked.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ block.normal = merge({}, block);

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

block.gfm.paragraph = replace(block.paragraph)
Expand Down
5 changes: 5 additions & 0 deletions test/new/gfm_hashtag.gfm.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<p>#header</p>

<h1 id="header1">header1</h1>

<h1 id="header2">header2</h1>
5 changes: 5 additions & 0 deletions test/new/gfm_hashtag.gfm.text
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#header

# header1

# header2
5 changes: 5 additions & 0 deletions test/new/gfm_hashtag.nogfm.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<h1 id="header">header</h1>

<h1 id="header1">header1</h1>

<h1 id="header2">header2</h1>
5 changes: 5 additions & 0 deletions test/new/gfm_hashtag.nogfm.text
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#header

# header1

# header2
5 changes: 5 additions & 0 deletions test/tests/gfm_hashtag.gfm.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<p>#header</p>

<h1 id="header1">header1</h1>

<h1 id="header2">header2</h1>
5 changes: 5 additions & 0 deletions test/tests/gfm_hashtag.gfm.text
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#header

# header1

# header2
5 changes: 5 additions & 0 deletions test/tests/gfm_hashtag.nogfm.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<h1 id="header">header</h1>

<h1 id="header1">header1</h1>

<h1 id="header2">header2</h1>
5 changes: 5 additions & 0 deletions test/tests/gfm_hashtag.nogfm.text
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#header

# header1

# header2

0 comments on commit 49b7eac

Please sign in to comment.