jekyll-commonmark-ghpages 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6470281fc72e16e39b73bc16f2c9dccab89efbf8
4
- data.tar.gz: d1c29d82bc80ab1f3178e817bbfbbcdea33a94ce
3
+ metadata.gz: 77b6b283ce101e3bf78441728c169a27f4bd2c3a
4
+ data.tar.gz: e9af36f45a26ed810b4610c5a4bf0210ecbd85d8
5
5
  SHA512:
6
- metadata.gz: aad3e680671949783313fd4f2f1173260d0ea79b32c13a532dbab4998c884bd6fa668117d3b761caf3ba3eaebf36a8e7cdd9038620c195fc146aefdcd4f7c3e4
7
- data.tar.gz: 77f5007b4b24ba762be7f69d19070c87e5dc88fa4e663a86526e9af47d76ba96f2f1c339ec3ca83609990c3d4a9fd5570ffdf53e19817421e25699b2710d2d1f
6
+ metadata.gz: 7de22399e10e9a446465401adf2f5497a22cbd698d108e0d8c014b88ac2bf472fbcb69642131901723512df859b444c657775eec1577eb50b972ec55160f3f7f
7
+ data.tar.gz: b5342bd1e45ec9759f9f375f24f1e579e2bb40ac113f7f135960592106bc2a134a8a4a35e17b7a5e85fe968225339e8b91e797b67cf0cb7de9a67a5b381da54a
@@ -3,7 +3,7 @@
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = "jekyll-commonmark-ghpages"
5
5
  spec.summary = "CommonMark generator for Jekyll"
6
- spec.version = "0.1.2"
6
+ spec.version = "0.1.3"
7
7
  spec.authors = ["Ashe Connor"]
8
8
  spec.email = "kivikakk@github.com"
9
9
  spec.homepage = "https://github.com/github/jekyll-commonmark-ghpages"
@@ -86,10 +86,11 @@ class Jekyll::Converters::Markdown
86
86
  parse_options = :DEFAULT if parse_options.empty?
87
87
  render_options = :DEFAULT if render_options.empty?
88
88
  doc = CommonMarker.render_doc(content, parse_options, @extensions)
89
- JekyllCommonMarkCustomRenderer.new(
89
+ html = JekyllCommonMarkCustomRenderer.new(
90
90
  :options => render_options,
91
91
  :extensions => @extensions
92
92
  ).render(doc)
93
+ html.gsub(/<br data-jekyll-commonmark-ghpages>/, "\n")
93
94
  end
94
95
  end
95
96
  end
@@ -99,6 +100,6 @@ class Jekyll::Tags::HighlightBlock
99
100
 
100
101
  def render_rouge(context)
101
102
  render_rouge_without_ghpages_hack(context)
102
- .gsub(/\r?\n/, "<br>")
103
+ .gsub(/\r?\n/, "<br data-jekyll-commonmark-ghpages>")
103
104
  end
104
105
  end
@@ -49,7 +49,7 @@ describe Jekyll::Renderer do
49
49
  out = Jekyll::Renderer.new(site, document).run
50
50
  expect(out).to match %r(<p><strong>Hi</strong></p>)
51
51
  expect(out).to match %r(<span class="gs">\*\*Yo\*\*</span>)
52
- expect(out).to match %r(<span class="gs">\*\*Hey\*\*</span>)
52
+ expect(out).to match %r(<span class="gs">\*\*Hey\*\*</span>\n\n)
53
53
  expect(out).to match %r(<span class="gs">\*\*Hello\*\*</span>)
54
54
  end
55
55
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-commonmark-ghpages
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ashe Connor