jekyll-commonmark-ghpages 0.1.1 → 0.1.2
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 +9 -0
- data/spec/test_spec.rb +24 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6470281fc72e16e39b73bc16f2c9dccab89efbf8
|
4
|
+
data.tar.gz: d1c29d82bc80ab1f3178e817bbfbbcdea33a94ce
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aad3e680671949783313fd4f2f1173260d0ea79b32c13a532dbab4998c884bd6fa668117d3b761caf3ba3eaebf36a8e7cdd9038620c195fc146aefdcd4f7c3e4
|
7
|
+
data.tar.gz: 77f5007b4b24ba762be7f69d19070c87e5dc88fa4e663a86526e9af47d76ba96f2f1c339ec3ca83609990c3d4a9fd5570ffdf53e19817421e25699b2710d2d1f
|
@@ -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.2"
|
7
7
|
spec.authors = ["Ashe Connor"]
|
8
8
|
spec.email = "kivikakk@github.com"
|
9
9
|
spec.homepage = "https://github.com/github/jekyll-commonmark-ghpages"
|
@@ -93,3 +93,12 @@ class Jekyll::Converters::Markdown
|
|
93
93
|
end
|
94
94
|
end
|
95
95
|
end
|
96
|
+
|
97
|
+
class Jekyll::Tags::HighlightBlock
|
98
|
+
alias render_rouge_without_ghpages_hack render_rouge
|
99
|
+
|
100
|
+
def render_rouge(context)
|
101
|
+
render_rouge_without_ghpages_hack(context)
|
102
|
+
.gsub(/\r?\n/, "<br>")
|
103
|
+
end
|
104
|
+
end
|
data/spec/test_spec.rb
CHANGED
@@ -29,3 +29,27 @@ describe Jekyll::Converters::Markdown::CommonMarkGhPages do
|
|
29
29
|
|
30
30
|
it { is_expected.to match %r{<h3 id="[^"]*">“Hi” <xmp><sup[^>]*><a href="#fn1"[^>]*>\[1\]</a></sup></h3>\n<section class="footnotes">\n<ol>\n<li id="fn1">\n<p>Yes. <a href="#fnref1".*</a></p>} }
|
31
31
|
end
|
32
|
+
|
33
|
+
describe Jekyll::Renderer do
|
34
|
+
it "should not re-process markdown in a liquid tag" do
|
35
|
+
site = Jekyll::Site.new(Jekyll.configuration("markdown" => "CommonMarkGhPages"))
|
36
|
+
collection = Jekyll::Collection.new(site, "pages")
|
37
|
+
document = Jekyll::Document.new("hello.md", site: site, collection: collection)
|
38
|
+
document.content = "**Hi**\n" \
|
39
|
+
"\n" \
|
40
|
+
"```markdown\n" \
|
41
|
+
"**Yo**\n" \
|
42
|
+
"```\n" \
|
43
|
+
"\n" \
|
44
|
+
"{% highlight markdown %}\n" \
|
45
|
+
"**Hey**\n" \
|
46
|
+
"\n" \
|
47
|
+
"**Hello**\n" \
|
48
|
+
"{% endhighlight %}\n"
|
49
|
+
out = Jekyll::Renderer.new(site, document).run
|
50
|
+
expect(out).to match %r(<p><strong>Hi</strong></p>)
|
51
|
+
expect(out).to match %r(<span class="gs">\*\*Yo\*\*</span>)
|
52
|
+
expect(out).to match %r(<span class="gs">\*\*Hey\*\*</span>)
|
53
|
+
expect(out).to match %r(<span class="gs">\*\*Hello\*\*</span>)
|
54
|
+
end
|
55
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-commonmark-ghpages
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ashe Connor
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-11-
|
11
|
+
date: 2017-11-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll-commonmark
|