content-pipeline 2.0.0 → 2.0.1

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: bba12870b71565c1fea769e7d42efdc24e6c81c6
4
- data.tar.gz: 5790bc5e711b6fd67ab6bfa5b2d0db3a902c8331
3
+ metadata.gz: 7cc955251ccebda8cb55d407827e8480ef62fa94
4
+ data.tar.gz: d061059ea9cfd251683788d54c8321aeddfd2304
5
5
  SHA512:
6
- metadata.gz: 5412086ab63a43647abcf2a0f8da42718dd6ab735957b890a3c851def70531398a8edaa72489177536a6581d1befc2a5622a0d0c8fded8615f218302b8ffecd5
7
- data.tar.gz: 3d4b8f9616ad5f9ffea5f369f17e657722587cb0d2c15ca3bb84527fe242760671cec73eec751355cb481d93b0e4f0c4c742a5e023605bfdad8f6b0995ee042b
6
+ metadata.gz: 7f99b023472d5e1d863a676f474148c97050d9590e4f667cf3738527f7a2080b932946ffaea72594a75938fce50e56ac76519773dc30253eb280abebe0162e92
7
+ data.tar.gz: 6873fe16ffc936e5eb9d185c496fdbe753b653076c15760492e53fa44cb905e5a5bb05656be845eb78174ebfbf23f2c66fb080554ce827522c03b57482195cad
@@ -9,17 +9,9 @@ class Content::Pipeline::Filters::Code < Content::Pipeline::Filter
9
9
 
10
10
  Matcher = /<pre>(.+)<\/pre>/m
11
11
  Templates = {
12
- :numb => %Q{<span class="line-number">%s</span>\n},
12
+ :wrap => '<figure class="highlight"><pre><code class="%s language-%s" ' \
13
+ 'data-programming-language="%s">%s</code></pre></figure>',
13
14
  :line => '<span class="line">%s</span>',
14
- :wrap => <<-HTML,
15
- <figure class="highlight">
16
- <pre>
17
- <code class="%s">
18
- %s
19
- </code>
20
- </pre>
21
- </figure>
22
- HTML
23
15
  }
24
16
 
25
17
  def initialize(*args)
@@ -37,7 +29,7 @@ class Content::Pipeline::Filters::Code < Content::Pipeline::Filter
37
29
 
38
30
  node.parent.replace(
39
31
  Templates[:wrap] % [
40
- lang, pygments(node.inner_text, lang)
32
+ lang, lang, lang, pygments(node.inner_text, lang)
41
33
  ]
42
34
  )
43
35
  end
@@ -2,18 +2,29 @@ require "content/pipeline"
2
2
 
3
3
  module Content::Pipeline::Jekyll
4
4
  class Converter < Jekyll::Converter
5
- ContentPipeline = Content::Pipeline.new
5
+ require "content/pipeline/filters/https"
6
+ require "content/pipeline/filters/gemoji"
7
+ require "content/pipeline/filters/code"
8
+
9
+ ContentPipeline = Content::Pipeline.new([
10
+ Content::Pipeline::Filters::Https,
11
+ Content::Pipeline::Filters::Markdown,
12
+ Content::Pipeline::Filters::Code
13
+ ])
14
+
15
+ def convert(data)
16
+ return ContentPipeline.filter(
17
+ data
18
+ )
19
+ end
6
20
 
7
21
  def matches(ext)
8
- ext =~ /\.(md|markdown)\Z/
22
+ ext =~ \
23
+ /\.(md|markdown)\Z/
9
24
  end
10
25
 
11
26
  def output_ext(ext)
12
27
  ".html"
13
28
  end
14
-
15
- def convert(data)
16
- ContentPipeline.filter(data)
17
- end
18
29
  end
19
30
  end
@@ -1,5 +1,5 @@
1
1
  module Content
2
2
  class Pipeline
3
- VERSION = "2.0.0"
3
+ VERSION = "2.0.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: content-pipeline
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jordon Bedwell