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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ac80a98f74de18d13c9b303f8229ae3bd098e6a2
4
- data.tar.gz: 2135a7a930e6a7c6b2e28653664fd4a14473f288
3
+ metadata.gz: 6470281fc72e16e39b73bc16f2c9dccab89efbf8
4
+ data.tar.gz: d1c29d82bc80ab1f3178e817bbfbbcdea33a94ce
5
5
  SHA512:
6
- metadata.gz: bc2ea6be7b6bfc484b19166b8033d15c6e7b65e32faa54b5527e61e598f3bb5a09034eb5fd2e6aaeb5bbbed9229ab81a70725f366f76ecaebfaef71ecb428e3a
7
- data.tar.gz: cfcd1c2e6db80661c50c146fac8cecb7415db2286e28550011172399820c2653b7669bbe94ce7a85099c99f21575ec79cbbb163fee0c40c1b624ecf47cd53bf8
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.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
@@ -29,3 +29,27 @@ describe Jekyll::Converters::Markdown::CommonMarkGhPages do
29
29
 
30
30
  it { is_expected.to match %r{<h3 id="[^"]*">“Hi” &lt;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.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-22 00:00:00.000000000 Z
11
+ date: 2017-11-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll-commonmark