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 +4 -4
- data/jekyll-commonmark-ghpages.gemspec +1 -1
- data/lib/jekyll-commonmark-ghpages.rb +3 -2
- data/spec/test_spec.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 77b6b283ce101e3bf78441728c169a27f4bd2c3a
|
4
|
+
data.tar.gz: e9af36f45a26ed810b4610c5a4bf0210ecbd85d8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
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
|
data/spec/test_spec.rb
CHANGED
@@ -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
|